Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Why does my android app need the ACCESS_NETWORK_STATE to run?

Why does my android app need the ACCESS_NETWORK_STATE to run?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
androidbuildnetworkstateapkpermission
3 Posts 2 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dangnh
    wrote on 1 Nov 2018, 14:17 last edited by dangnh 11 Jan 2018, 15:28
    #1

    Hi everyone,
    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.

    K 1 Reply Last reply 1 Nov 2018, 14:55
    0
    • D dangnh
      1 Nov 2018, 14:17

      Hi everyone,
      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.

      K Offline
      K Offline
      koahnig
      wrote on 1 Nov 2018, 14:55 last edited by
      #2

      @dangnh

      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.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      3
      • D Offline
        D Offline
        dangnh
        wrote on 7 Nov 2018, 01:58 last edited by
        #3

        @koahnig Thank you for your reply

        1 Reply Last reply
        0

        3/3

        7 Nov 2018, 01:58

        • Login

        • Login or register to search.
        3 out of 3
        • First post
          3/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved