Comments (9)
Hi again,
Yes, I can confirm it has that permission.
It seems I can reproduce if I run it on Pixel 3A - API29
but not on Pixel 3A - API 28
even after changing the target-sdk
to 29
.
Can you confirm? Thanks.
from cordova-plugin-network-information.
Nope, I still do not experience a device crash on a Pixel 3A, using a simple test app that alerts on network change (which it fires once on launch).
Previously I tested on an existing emulator I had, which was based on Pixel 2, but I'm pretty sure these are just skins and don't actually change the behaviour of the app (other than screen resolutions and some other technical details like total memory)
It's weird that you see the permission tag inside AndroidManifest.xml
but having an error that suggest your app doesn't have that permission.
The next thing I'd confirm is if your apk actually has those permissions listed. You can check this by using the aapt
tool:
aapt d permissions <path/to/apk>
You may need to add the android build tools to your path in order to use aapt
. The executable should be located at: $ANDROID_HOME/build-tools/29.0.2/
Note that your build tools version may vary.
The expected output of the aapt
command above should be something like:
$ aapt d permissions app-debug.apk
package: com.bt.network
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
If ACCESS_NETWORK_STATE
is missing, then there is something happening between writing the AndroidManifest.xml
and actually building the apk. Or the AndroidManifest.xml
is improper. If this is the case, we'd need to see if we can build a sample reproduction app that includes the minimal amount of configuration necessary to reproduce the problem. Since I haven't been able to reproduce it myself, it seems likely there might be another plugin causing a conflict.
Here's a list of others things you can try:
- Reinstalling the the plugin and/or the platform
- Updated android sdk/build tools. Since you're using cordova-android@8/ android sdk 28, you should be using build tools 28.
- Consider upgrading to cordova-android@9 & updating android sdk to 29 / build tools 29
from cordova-plugin-network-information.
I've tried on Cordova Android 9.0.0
but there are still some startup crashes (not sure if it's still related to the permissions now, since the errors are gone and it's still using target28 even on CA-9.0.0.)
. I'm suspecting it's the exporter having issues, I'm going to check the from the engine's side, that I'm using, instead.
Thank you for the help.
from cordova-plugin-network-information.
Since I'm not sure what's causing this yet, I'll just close this and make a new thread if any case there is really something wrong.
Thanks.
from cordova-plugin-network-information.
What is your target SDK (or if you don't explicitly set it, what is your version of cordova-android
)?
from cordova-plugin-network-information.
Hi,
Here are the build versions.
Cordova-Android : 8.1.0
android-minSdkVersion: 28
android-targetSdkVersion: 28
Thank you.
from cordova-plugin-network-information.
Hmm, I'm not reproducing this with a simple cordova app on an android 10 emulator.
It looks like for some reason, your app is missing the <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
declaration in your AndroidManifest.xml
file. This is something the plugin adds on installation.
Can you confirm that line exists inside <project-root>/platforms/android/app/src/main/AndroidManifest.xml
? It should appear as a child of the <manifest>
tag somewhere.
from cordova-plugin-network-information.
Got it, I will confirm. Thanks.
from cordova-plugin-network-information.
Let me know if this issue can be closed.
If not, then I think we'll need a sample reproduction app to continue.
from cordova-plugin-network-information.
Related Issues (20)
- IOS 13.4 not working offline HOT 2
- core.js:6014 ERROR RangeError: Maximum call stack size exceeded HOT 2
- bug: 'onConnect' does not work as expected HOT 10
- Refactor eslint to use cordova-eslint HOT 1
- Drop support for node < 10. HOT 1
- 5G detection HOT 13
- Correct network detection API calls deprecated on Android and iOS HOT 2
- network.connection.type is giving value as unknown in case of IOS 14 HOT 2
- Under no network conditions, start the App HOT 1
- What exactly is triggering online/offline events? HOT 2
- How to install specific version? HOT 2
- what 's new in version 3.0 ? should I need to update? HOT 1
- Issue with Ionic-native/network onConnect() on upgrade to Angular 10 HOT 1
- network.type is set to 'wifi' even when iPad Air is set to flight modus or when I am turning off WiFi
- Wrong typing for Connection
- 5G detect support HOT 4
- Network Up and Down Speed in android
- Navigator.connection support
- #throwInvalidProviderError HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-network-information.