2017-12-29 53 views
1

Android의 Cordova-plugin-network-information에 문제가 있습니다. 4G 연결이 있더라도 백그라운드에서 앱을 다시 시작하고 navigator.connection.type과의 연결을 확인하면 connection.type = NONE을 반환하지만 인터넷에 연결되어 있습니다. 앱을 닫고 다시 열면 connection.type = 4G가 반환됩니다. I 사용자 [email protected][email protected]4G 연결이 있더라도 cordova-plugin-network-information 안드로이드 반환 connection.type = NONE 정보

답변

0

봅니다 사용하는

document.addEventListener("deviceready", onDeviceReady, false); 
     function onDeviceReady() { 
      if(navigator.onLine) { 
       alert("Internet Connect"); 
        }else { 
         alert("No Internet"); 
        } 
     }