Coder Social home page Coder Social logo

Comments (20)

iamroof avatar iamroof commented on June 14, 2024 13

@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

from cordova-plugin-network-information.

TMesdo avatar TMesdo commented on June 14, 2024 4

Same here and I've also problem in this case :

  1. Connect to WiFi A + 4G (navigator.connection.type : wifi)
  2. Move enough to lost WiFi A and phone switch to 4G (navigator.connection.type : 4g)
  3. Come back to auto reconnect to WiFi A + 4G (navigator.connection.type : none)

from cordova-plugin-network-information.

janpio avatar janpio commented on June 14, 2024 2

Nice reproduction steps @iamroof - that should be enough for a developer to debug this.

from cordova-plugin-network-information.

shineabel avatar shineabel commented on June 14, 2024 2

+1

from cordova-plugin-network-information.

shineabel avatar shineabel commented on June 14, 2024 2

Is there any solution?

from cordova-plugin-network-information.

philliphartin avatar philliphartin commented on June 14, 2024 1

I am also having this issue on iOS, but for me, I just have to simply flick on airplane mode on and off for the network.type to always return NONE

from cordova-plugin-network-information.

anaaChacon avatar anaaChacon commented on June 14, 2024 1

+1

from cordova-plugin-network-information.

janpio avatar janpio commented on June 14, 2024

What are the exact steps to reproduce this? Start with cordova create and include all necessary steps to build the app - or upload a minimal example to Github and describe the steps to reproduce this. Thank you.

from cordova-plugin-network-information.

NeoLSN avatar NeoLSN commented on June 14, 2024

I can also confirmed that.
Phone Model - Xiao Mi Mix 2.

from cordova-plugin-network-information.

janpio avatar janpio commented on June 14, 2024

@iamroof Was your issue also with Android?
@NeoLSN What Android version is running on that device?

What plugin version?
What Cordova CLI and Cordova platform version?
What code are you running?

from cordova-plugin-network-information.

NeoLSN avatar NeoLSN commented on June 14, 2024

@janpio Android 8.0 / 2.0.1 / 8.0.0 / ionic-angular

from cordova-plugin-network-information.

regiMario avatar regiMario commented on June 14, 2024

I'm having the same issue with version 2.0.1. I use an app the next morning and it says no network although i have WIFI.
I haven't been able to reproduce it with say airplane mode on/off either. I'm running 7.1.1 on a Sony Xperia E6883 dual sim model.
Is there any way to give this thing a kick to get it to recheck as a workaround?

from cordova-plugin-network-information.

janpio avatar janpio commented on June 14, 2024

Create a new issue please @pjhartin as this seems to be a totally different issue (iOS instead of Android) than this one. Otherwise your problem will get lost.

from cordova-plugin-network-information.

anaaChacon avatar anaaChacon commented on June 14, 2024

What is the solution?

from cordova-plugin-network-information.

Siva021 avatar Siva021 commented on June 14, 2024

Is there any alternative solution for this particular issue?? It seems like important

from cordova-plugin-network-information.

anaaChacon avatar anaaChacon commented on June 14, 2024

the solution that it poses @PieterVanPoyer has solved the problem for me pm android, but in them there is iOS no solution, at the moment I am satisfied.

from cordova-plugin-network-information.

BurkusCat avatar BurkusCat commented on June 14, 2024

Still seeing the issue with @PieterVanPoyer 's forked version. From my experience, it has been happening closer to the 36 hour mark.

from cordova-plugin-network-information.

shineabel avatar shineabel commented on June 14, 2024

Still seeing the issue with @PieterVanPoyer 's forked version. From my experience, it has been happening closer to the 36 hour mark.

+1

from cordova-plugin-network-information.

paridaJhansi avatar paridaJhansi commented on June 14, 2024

network.connection.type is thorwing unknown in case of ios 14 in case of 4g connection. please help if anyone has faced this issue.
plugin version is 2.0.3

from cordova-plugin-network-information.

PieterVanPoyer avatar PieterVanPoyer commented on June 14, 2024

network.connection.type is thorwing unknown in case of ios 14 in case of 4g connection. please help if anyone has faced this issue.
plugin version is 2.0.3

-> I think you should make a comment on next issue: #97
That issue is about ios and unkown connection type.
This issue is closed.

from cordova-plugin-network-information.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.