- Home /
Android Internet not connecting
I have a simple method that is attempting to connect to the internet. It works in the Unity editor and in a standalone build, however it doesn't on Android.
public static IEnumerator Login(string username, string password, Action complete)
{
WWW reader;
do
{
string url = string.Format(UrlStart + "Login.php?user={0}&pass={1}", username, password);
reader = new WWW(url);
yield return reader;
}
while (reader.error != null);
Logger.Log(LogTopic.Framework, "Logged in as " + username);
complete();
}
As you can see there's not a lot to it, yet for some reason it doesn't work. I made sure internet is a requirement in the player settings, my phone's internet is turned on. I even manually typed in the URL on my phone (in the browser), and I got the results I expected.
What would cause this?
Answer by Randomman159 · Sep 10, 2014 at 12:20 AM
I didn't have 'http://' in the URL. This meant it didn't work on Android.
Your answer
Follow this Question
Related Questions
www return empty text on android 0 Answers
Unity download audio 1 Answer
How can i do youtube video player from video url for Android devices ? 0 Answers
WWW Android Memory Leak? 1 Answer