-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native: tried calling Network.type, but the Network plugin is not installed. #1335
Comments
Same issue here! |
Is this issue with Ionic Native 2.x? |
Yes ionic native 2.8.1 |
Make sure you have the latest version of
|
You can reopen this because the issue is still there on |
I have the same error. Re-installed plugin per the above and still get this error when running in browser via "ionic serve"
Cordova plugin list shows the plugin is in fact installed. This is with Ionic V1. ionic info cli packages: (/Users/markwatkins/.nvm/versions/node/v8.9.4/lib/node_modules)
global packages:
local packages:
System:
Environment Variables:
Misc:
Marks-Air-2:newBookship4 markwatkins$ ionic cordova plugin list
|
this issue should be opened. I still have it |
(After fooling with the below again, I cannot get any variation to work, I think this is the wrong track. I think I am missing something in how to use this plugin in Ionic V1. My usage goes something like:
I noticed a line in another issue (#357) which might be a clue: @ihadeed said...
(instead of the traditional syntax of $cordovaTransfer.upload()) And based on this (#86) I am working if Network is one of those instance based plugins? (Incidentally I can find no documentation about which Ionic Native plugins are instance based and so don't use the normal provider syntax reference pattern...) So I haven't had a chance to try it (worked around this by not using the plugin) but I wonder if something along the lines of
or
then... might work? |
@viking2917 I tried it but without luck. It still gives the same error msg. Thanks! |
@polfernandez me too. I really only needed it to detect whether an internet connection was present and a simple workaround of
seemed to do the trick for me, with no need for the plugin. |
@viking2917 thanks for the hint. However, I would like to get the connection speed and I did not find any other alternative. |
I use network information on my project.
Ionic info:
Cordova CLI: 6.5.0
Ionic Framework Version: 2.2.0
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.1.4
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 8.1
Node Version: v7.7.3
Xcode version: Not installed
I have followed the instructions in doc.
https://ionicframework.com/docs/native/network/
$ ionic plugin add cordova-plugin-network-information
$ npm install --save @ionic-native/network
But when i make console.log(Network.type) this return null and i this message
Native: tried calling Network.type, but the Network plugin is not installed.
Install the Network plugin: 'ionic plugin add cordova-plugin-network-information
Thanks for helping me to solve this BUG.
The text was updated successfully, but these errors were encountered: