You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/08/22 15:10:52 UTC

[GitHub] iamroof edited a comment on issue #64: Network.type is throwing as none after 24 hours of idle

iamroof edited a comment on issue #64: Network.type is throwing as none after 24 hours of idle
URL: https://github.com/apache/cordova-plugin-network-information/issues/64#issuecomment-415062636
 
 
   @janpio Hi, This issue is only with android. Below is the dev environment
   
   Ionic v3.20.0
   Angular v5.2.9
   Cordova Android v6.4.0
   cordova-plugin-network-information v2.0.1 
   
   Phone Model : Nexus 5x - Android v7, Lenovo K4 Note - Android 6
   
   This issue occurs in almost all tested mobiles. 
   
   ```
   isNetworkAvailable(): boolean{
           return (this.network.type === "none") ? false : true;
       }
   ```
   
   Above sample snipet is used to check online/offline. 
   
   Reproduce Steps:
   
   Consider application has a button which will consume rest services. Network will be checked before hitting rest services.
   
   1) Open Application
   2) Click the button. Network.type gives wifi.
   3) Lock your mobile. 
   4) Unlock your mobile after 24 hours. You will be in same page of application
   5) Click the button again. It gives Network.type as "none" (Checked browser for online connectivity)
   
   This issue will be resolved after killing and reopening the application
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org