- Home /
 
 
               Question by 
               InsOp · Mar 14, 2017 at 09:36 AM · 
                networkingwwwwww.error  
              
 
              Cant connect to internet server on android
I cannot connect to a internet server with android. Tho this gives false, which is good: Application.internetReachability == NetworkReachability.NotReachable
But when trying to execute this snippet:
 IEnumerator testConnection() {
         WWW www = new WWW("www.google.com", null, header);
         yield return www;
         // check for errors
         if (www.error == null) {
             util.debug("works");
         } else {
             // www.error and www.text both are empty
             util.debug("testing: WWW Error: " + www.error + www.text); 
         }
     }
 
               it works via unity editor and windows executable, but not on my android device (v 6) Is there a known solution to this?
Edit: Ping also seem to work:
 IEnumerator PingGoogle() {
     Ping googPing  = new Ping("172.217.6.195");
    
     while (!googPing.isDone) {
         yield return googPing;
     }
     util.debug("ping works: " + googPing.time); //I reach this point with the app
 }
 
              
               Comment
              
 
               
              Same problem here - at smartphones with newest android connection works, but older one can't connect to my server :-O
Your answer
 
             Follow this Question
Related Questions
Is Unity 4's WWW class supporting TLS as the encryption layer for HTTPS? 0 Answers
How to read local XML file on iOS? 1 Answer
WWW Class is acting up 1 Answer
Unity networking tutorial? 6 Answers