Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Why does my android app need the ACCESS_NETWORK_STATE to run?
dangnh last edited by dangnh
I'm new to Qt and I want to create a small Android app,that displays an anaclock
When I build it as .apk file with no permissions in AndroidManifest.xml,it crashes with this error report:
... JNI DETECTED ERROR IN APPLICATION: JNI GetMethodID called with pending exception java.lang.SecurityException: ConnectivityService: Neither user 10207 nor current process has android.permission.ACCESS_NETWORK_STATE ...
and when I add the "android.permission.ACCESS_NETWORK_STATE" to AndroidManifest.xml,it runs without any problems
I'm sure that I get the time from QTime class,then control the clock using QGraphics View
So why does my app need that permission to run normally?
Thanks for reading.
koahnig last edited by
Hi and welcome to devnet forum
At least QTime is reading some information from your device. Therefore, you need some rights to do so. That is my guess.
Probably there are a couple of different permissions which may cover also the internal clock. You simply need to have one.
Here are the different permissions possible, search for one you like most.
dangnh last edited by
@koahnig Thank you for your reply