Hi everyone, I have my game pulling a bunch of data from my server just using a standard www request as below (just part of my code).
WWW wwwLogin = new WWW (url);
StartCoroutine (WaitForRequestLogin (wwwLogin));
Everything works fine on all Android and iOS devices I’ve tested on. But I’ve had a few users who just got on to Android P who have told me the game no longer works. So I’ve got an emulator running on my pc and sure enough the game does nothing. The www request returns no data or no errors at least from what I can tell printing results to the screen of the phone.
So my question is, have they changed something in Android Pie? Does the WWW request work differently? Do i need new permissions in the manifest? Do I need to upgrade to the newest version of unity for Android P?
Hopefully someone can shed some light on this for me.
Is anyone able to pull data with a simple request in the Android P emulator?
I’ve even started a new project and in the editor, pre-android p and ios can pull basic data from a server. But then I deploy this new project to the Android P emulator and get “Unknown error” returned, no matter how I approach it or what server I access
What is the way around if we want to use a legacy non-secure url?
Currently by default all non-secure URLs are being rejected by P which is breaking the game.
Also, if we change the URLs to https, will it affect older versions of Android? I read somewhere that https is not supported below API 20? We are using:
WWWForm form = new WWWForm();
form.AddField(“playername”, SaveManager.Instance.state.PlayerId);
form.AddField(“platform”, “android”);
form.AddField(“userid”, SaveManager.Instance.state.SocialId);
Looking at Unity code I see that TLS 1.1 and 1.2 are supported since API 16, but they are enabled by default since API 20. However, we do enable them, so API 16 and higher is fine. If your site uses TLS 1.0, I suppose you could go even lower, but please do some research on that.