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. API issues with Xiaomi MI 8
Forum Updated to NodeBB v4.3 + New Features

API issues with Xiaomi MI 8

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
androidxiaomi mi 8android update
17 Posts 5 Posters 4.0k Views 3 Watching
  • 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.
  • K Offline
    K Offline
    koahnig
    wrote on last edited by
    #1

    Using a brand new Xiaomi MI8 for testing for a couple of days. After a MIUI update this morning I have follwoing issue when starting Qt based applications:
    0_1549614720019_Screenshot_2019-02-08-09-18-37-022.png
    This is a test with the notification example of Qt.Despite the warning the application seem to run without further issues. The screen pops up immediately after start of the application. The same with another more complex application.
    0_1549615026158_Screenshot_2019-02-08-09-35-54-054_com.android.settings.png

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

    raven-worxR J.HilkJ 2 Replies Last reply
    0
    • K koahnig

      Using a brand new Xiaomi MI8 for testing for a couple of days. After a MIUI update this morning I have follwoing issue when starting Qt based applications:
      0_1549614720019_Screenshot_2019-02-08-09-18-37-022.png
      This is a test with the notification example of Qt.Despite the warning the application seem to run without further issues. The screen pops up immediately after start of the application. The same with another more complex application.
      0_1549615026158_Screenshot_2019-02-08-09-35-54-054_com.android.settings.png

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by raven-worx
      #2

      @koahnig
      can you please provide the logcat

      # First clear the existing logcat messages
      adb logcat -c
      
      # Then reproduce the issue and save the logcat messages to a file
      adb logcat -d > logcat.txt
      

      also to make sure: you are trying to run an unchanged Notification example?

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • K koahnig

        Using a brand new Xiaomi MI8 for testing for a couple of days. After a MIUI update this morning I have follwoing issue when starting Qt based applications:
        0_1549614720019_Screenshot_2019-02-08-09-18-37-022.png
        This is a test with the notification example of Qt.Despite the warning the application seem to run without further issues. The screen pops up immediately after start of the application. The same with another more complex application.
        0_1549615026158_Screenshot_2019-02-08-09-35-54-054_com.android.settings.png

        J.HilkJ Online
        J.HilkJ Online
        J.Hilk
        Moderators
        wrote on last edited by
        #3

        @koahnig is this with your 5.12.1 setup or your 5.11.3 ?
        I'm asking because of ndk, sdk and linked jdk version.


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        K 1 Reply Last reply
        0
        • J.HilkJ J.Hilk

          @koahnig is this with your 5.12.1 setup or your 5.11.3 ?
          I'm asking because of ndk, sdk and linked jdk version.

          K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          @J.Hilk
          This is with Qt5.11.3

          0_1549618447630_1a115280-61d6-41fd-b19c-0319e5d455c7-image.png

          @raven-worx
          The example was slightly modified, since of a compile error with the original source. Unfortunately, I have copied over the running code and cannot recompile right away. Need to restore compilable code.

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

          J.HilkJ 1 Reply Last reply
          0
          • K Offline
            K Offline
            koahnig
            wrote on last edited by
            #5

            @raven-worx

            I have restored the original example code of Qt5.11.3. Previously mentioned compile error was due to a change which slipped through when checking.

            Here is the dump as requested (first few lines only). Do you need the complete dump?
            It is rather "big", at least for posting. I can provide it through a link.

            --------- beginning of main
            02-08 11:03:31.028 23264 23312 D ClClient: Not sending keepalive.  Current connection state=STOPPED
            02-08 11:03:33.077   703  3062 I WifiHAL : event received NL80211_CMD_VENDOR, vendor_id = 0x1374, subcmd = 0xa
            02-08 11:03:33.085  3014  3014 I wpa_supplicant: wlan0: CTRL-EVENT-AVOID-FREQ ranges=
            02-08 11:03:41.053 23264 23312 D ClClient: Not sending keepalive.  Current connection state=STOPPED
            02-08 11:03:44.104   703  3062 I WifiHAL : event received NL80211_CMD_VENDOR, vendor_id = 0x1374, subcmd = 0xa
            02-08 11:03:44.109  3014  3014 I wpa_supplicant: wlan0: CTRL-EVENT-AVOID-FREQ ranges=5500-5640
            02-08 11:03:44.558  1556  1556 W Binder:1556_19: type=1400 audit(0.0:7731): avc: denied { sigstop } for scontext=u:r:system_server:s0 tcontext=u:r:untrusted_app_27:s0:c512,c768 tclass=process permissive=0
            --------- beginning of system
            02-08 11:03:44.567  1556  4867 I ActivityManager: Force stopping org.qtproject.example.notification appid=10166 user=0: from process:29970
            02-08 11:03:44.568  1556  4867 I AutoStartManagerService: MIUILOG- Reject RestartService packageName :org.qtproject.example.notification uid : 10166
            02-08 11:03:44.569  1556  4867 D AutoStartManagerService: prepare force stop 29626
            02-08 11:03:44.569  1556  4867 I Process : Sending signal. PID: 29626 SIG: 19
            02-08 11:03:44.570  1556  4867 I ActivityManager: Killing 29626:org.qtproject.example.notification/u0a166 (adj 700): stop org.qtproject.example.notification: from process:29970
            02-08 11:03:44.572  3915  4320 D PowerKeeper.Event: notifyActiveKilled processName: org.qtproject.example.notification, pid:29626, reason:stop org.qtproject.example.notification: from process:29970
            

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

            raven-worxR 1 Reply Last reply
            0
            • K koahnig

              @raven-worx

              I have restored the original example code of Qt5.11.3. Previously mentioned compile error was due to a change which slipped through when checking.

              Here is the dump as requested (first few lines only). Do you need the complete dump?
              It is rather "big", at least for posting. I can provide it through a link.

              --------- beginning of main
              02-08 11:03:31.028 23264 23312 D ClClient: Not sending keepalive.  Current connection state=STOPPED
              02-08 11:03:33.077   703  3062 I WifiHAL : event received NL80211_CMD_VENDOR, vendor_id = 0x1374, subcmd = 0xa
              02-08 11:03:33.085  3014  3014 I wpa_supplicant: wlan0: CTRL-EVENT-AVOID-FREQ ranges=
              02-08 11:03:41.053 23264 23312 D ClClient: Not sending keepalive.  Current connection state=STOPPED
              02-08 11:03:44.104   703  3062 I WifiHAL : event received NL80211_CMD_VENDOR, vendor_id = 0x1374, subcmd = 0xa
              02-08 11:03:44.109  3014  3014 I wpa_supplicant: wlan0: CTRL-EVENT-AVOID-FREQ ranges=5500-5640
              02-08 11:03:44.558  1556  1556 W Binder:1556_19: type=1400 audit(0.0:7731): avc: denied { sigstop } for scontext=u:r:system_server:s0 tcontext=u:r:untrusted_app_27:s0:c512,c768 tclass=process permissive=0
              --------- beginning of system
              02-08 11:03:44.567  1556  4867 I ActivityManager: Force stopping org.qtproject.example.notification appid=10166 user=0: from process:29970
              02-08 11:03:44.568  1556  4867 I AutoStartManagerService: MIUILOG- Reject RestartService packageName :org.qtproject.example.notification uid : 10166
              02-08 11:03:44.569  1556  4867 D AutoStartManagerService: prepare force stop 29626
              02-08 11:03:44.569  1556  4867 I Process : Sending signal. PID: 29626 SIG: 19
              02-08 11:03:44.570  1556  4867 I ActivityManager: Killing 29626:org.qtproject.example.notification/u0a166 (adj 700): stop org.qtproject.example.notification: from process:29970
              02-08 11:03:44.572  3915  4320 D PowerKeeper.Event: notifyActiveKilled processName: org.qtproject.example.notification, pid:29626, reason:stop org.qtproject.example.notification: from process:29970
              
              raven-worxR Offline
              raven-worxR Offline
              raven-worx
              Moderators
              wrote on last edited by
              #6

              @koahnig
              so the error message comes from those:

              02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->ViewDrawableStates:[I (light greylist, reflection)
              02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_background:I (light greylist, reflection)
              02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_padding:I (light greylist, reflection)
              02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_paddingLeft:I (light greylist, reflection)
              02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_paddingTop:I (light greylist, reflection)
              02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_paddingRight:I (light greylist, reflection)
              02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_paddingBottom:I (light greylist, reflection)
              02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_scrollX:I (light greylist, reflection)
              02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_scrollY:I (light greylist, reflection)
              02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_id:I (light greylist, reflection)
              02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_tag:I (light greylist, reflection)
              02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_fitsSystemWindows:I (light greylist, reflection)
              02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_focusable:I (light greylist, reflection)
              02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_focusableInTouchMode:I (light greylist, reflection)
              02-08 11:14:47.428 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_clickable:I (light greylist, reflection)
              02-08 11:14:47.428 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_longClickable:I (light greylist, reflection)
              02-08 11:14:47.428 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_saveEnabled:I (light greylist, reflection)
              02-08 11:14:47.428 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_duplicateParentState:I (light greylist, reflection)
              02-08 11:14:47.428 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_visibility:I (light greylist, reflection)
              
              ....
              and many more
              

              I will check later, when i have time.

              --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
              If you have a question please use the forum so others can benefit from the solution in the future

              K 1 Reply Last reply
              1
              • K koahnig

                @J.Hilk
                This is with Qt5.11.3

                0_1549618447630_1a115280-61d6-41fd-b19c-0319e5d455c7-image.png

                @raven-worx
                The example was slightly modified, since of a compile error with the original source. Unfortunately, I have copied over the running code and cannot recompile right away. Need to restore compilable code.

                J.HilkJ Online
                J.HilkJ Online
                J.Hilk
                Moderators
                wrote on last edited by
                #7

                @koahnig
                I don't have an Android 9 device to test with, but I know that one of my apps is running on a Mate 20Pro that should be the newest OS, without any issue.

                It's made with Qt5.12.1 and ndk r18b, so it may be an outdated NDK version ?


                Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                Q: What's that?
                A: It's blue light.
                Q: What does it do?
                A: It turns blue.

                K 1 Reply Last reply
                2
                • J.HilkJ J.Hilk

                  @koahnig
                  I don't have an Android 9 device to test with, but I know that one of my apps is running on a Mate 20Pro that should be the newest OS, without any issue.

                  It's made with Qt5.12.1 and ndk r18b, so it may be an outdated NDK version ?

                  K Offline
                  K Offline
                  koahnig
                  wrote on last edited by
                  #8

                  @J.Hilk

                  This is NDK r10e

                  Therefore, you might be right that it is the NDK version. I am going to test Qt5.12. later. This requires a newer NDK anyhow.

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

                  1 Reply Last reply
                  0
                  • raven-worxR raven-worx

                    @koahnig
                    so the error message comes from those:

                    02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->ViewDrawableStates:[I (light greylist, reflection)
                    02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_background:I (light greylist, reflection)
                    02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_padding:I (light greylist, reflection)
                    02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_paddingLeft:I (light greylist, reflection)
                    02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_paddingTop:I (light greylist, reflection)
                    02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_paddingRight:I (light greylist, reflection)
                    02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_paddingBottom:I (light greylist, reflection)
                    02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_scrollX:I (light greylist, reflection)
                    02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_scrollY:I (light greylist, reflection)
                    02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_id:I (light greylist, reflection)
                    02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_tag:I (light greylist, reflection)
                    02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_fitsSystemWindows:I (light greylist, reflection)
                    02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_focusable:I (light greylist, reflection)
                    02-08 11:14:47.427 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_focusableInTouchMode:I (light greylist, reflection)
                    02-08 11:14:47.428 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_clickable:I (light greylist, reflection)
                    02-08 11:14:47.428 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_longClickable:I (light greylist, reflection)
                    02-08 11:14:47.428 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_saveEnabled:I (light greylist, reflection)
                    02-08 11:14:47.428 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_duplicateParentState:I (light greylist, reflection)
                    02-08 11:14:47.428 32250 32250 W le.notificatio: Accessing hidden field Landroid/R$styleable;->View_visibility:I (light greylist, reflection)
                    
                    ....
                    and many more
                    

                    I will check later, when i have time.

                    K Offline
                    K Offline
                    koahnig
                    wrote on last edited by
                    #9

                    @raven-worx

                    Take your time. It seems to work.

                    @J-Hilk @raven-worx

                    Thought that I noted before that restarting the app directly on phone does not show message. Therefore, I did some testing.
                    Starting through creator brings up message. Restarting from phone does NOT.
                    Rebuild application and NOT starting through creator, but deployment to device. Starting on phone directly --> No Message.

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

                    J.HilkJ 1 Reply Last reply
                    1
                    • K koahnig

                      @raven-worx

                      Take your time. It seems to work.

                      @J-Hilk @raven-worx

                      Thought that I noted before that restarting the app directly on phone does not show message. Therefore, I did some testing.
                      Starting through creator brings up message. Restarting from phone does NOT.
                      Rebuild application and NOT starting through creator, but deployment to device. Starting on phone directly --> No Message.

                      J.HilkJ Online
                      J.HilkJ Online
                      J.Hilk
                      Moderators
                      wrote on last edited by J.Hilk
                      #10

                      @koahnig said in API issues with Xiaomi MI 8:

                      Thought that I noted before that restarting the app directly on phone does not show message. Therefore, I did some testing.
                      Starting through creator brings up message. Restarting from phone does NOT.
                      Rebuild application and NOT starting through creator, but deployment to device. Starting on phone directly --> No Message.

                      Uh, than It may be related to this
                      https://bugreports.qt.io/browse/QTCREATORBUG-21389

                      The debug support is sorely depending in the OEM so an update on your device may cause the run-as command not to behave as it previously did.


                      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                      Q: What's that?
                      A: It's blue light.
                      Q: What does it do?
                      A: It turns blue.

                      K 1 Reply Last reply
                      0
                      • J.HilkJ J.Hilk

                        @koahnig said in API issues with Xiaomi MI 8:

                        Thought that I noted before that restarting the app directly on phone does not show message. Therefore, I did some testing.
                        Starting through creator brings up message. Restarting from phone does NOT.
                        Rebuild application and NOT starting through creator, but deployment to device. Starting on phone directly --> No Message.

                        Uh, than It may be related to this
                        https://bugreports.qt.io/browse/QTCREATORBUG-21389

                        The debug support is sorely depending in the OEM so an update on your device may cause the run-as command not to behave as it previously did.

                        K Offline
                        K Offline
                        koahnig
                        wrote on last edited by
                        #11

                        @J.Hilk

                        I think it may be a different issue.

                        First of all the message appears for debug and release compilation.
                        Second, the applications are started Ctrl+r (run) in creator.
                        Third, I have issues with debugging F5 anyhow. See https://forum.qt.io/topic/98729/debugging-on-physical-android-device-gives-error-code

                        I can debug with older device(s) respectively Android versions. 5.1 on a Google tablet it works, but Huawei P10 Android 8.0 and Xiaomi MI8 Android 9 cannot be used for debugging.
                        However, any version running through Ctrl+r provides output to Application window. Therefore qDebug(), print statements and Log are the means for debugging.

                        Wanna be back to the future ;)

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

                        raven-worxR 1 Reply Last reply
                        0
                        • K koahnig

                          @J.Hilk

                          I think it may be a different issue.

                          First of all the message appears for debug and release compilation.
                          Second, the applications are started Ctrl+r (run) in creator.
                          Third, I have issues with debugging F5 anyhow. See https://forum.qt.io/topic/98729/debugging-on-physical-android-device-gives-error-code

                          I can debug with older device(s) respectively Android versions. 5.1 on a Google tablet it works, but Huawei P10 Android 8.0 and Xiaomi MI8 Android 9 cannot be used for debugging.
                          However, any version running through Ctrl+r provides output to Application window. Therefore qDebug(), print statements and Log are the means for debugging.

                          Wanna be back to the future ;)

                          raven-worxR Offline
                          raven-worxR Offline
                          raven-worx
                          Moderators
                          wrote on last edited by raven-worx
                          #12

                          @koahnig
                          there is also another thread regarding this.
                          Seems this is heavily dependent on the OEM and their customized Android or at least most manufacturers are hiding the popup by default?
                          But anyway sooner or later this will become a problem for all Qt Android apps: https://developer.android.com/about/versions/pie/restrictions-non-sdk-interfaces

                          What API level are you actually targeting?

                          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                          If you have a question please use the forum so others can benefit from the solution in the future

                          K 1 Reply Last reply
                          4
                          • raven-worxR raven-worx

                            @koahnig
                            there is also another thread regarding this.
                            Seems this is heavily dependent on the OEM and their customized Android or at least most manufacturers are hiding the popup by default?
                            But anyway sooner or later this will become a problem for all Qt Android apps: https://developer.android.com/about/versions/pie/restrictions-non-sdk-interfaces

                            What API level are you actually targeting?

                            K Offline
                            K Offline
                            koahnig
                            wrote on last edited by
                            #13

                            @raven-worx

                            Target API is 26, 24 might be ok too.

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

                            1 Reply Last reply
                            0
                            • D Offline
                              D Offline
                              davidesalvetti
                              wrote on last edited by
                              #14

                              I just found I have the same problem too, are there any news about this thread?

                              K ekkescornerE 2 Replies Last reply
                              0
                              • D davidesalvetti

                                I just found I have the same problem too, are there any news about this thread?

                                K Offline
                                K Offline
                                koahnig
                                wrote on last edited by
                                #15

                                @davidesalvetti

                                Not from my side. I am still using Qt5.11.3 with 0_1550567338922_26e150ea-c2be-4110-8950-fadea60005be-image.png
                                The message is only displayed on phone when starting from qt creator. When theapp is started from phone the very same app does not display the message anymore.

                                So far I consider this as a nuisance, but forunately without effect on the performance of the app itself. I am more bothered that the debugging does not work as with older Android versions.

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

                                1 Reply Last reply
                                0
                                • D davidesalvetti

                                  I just found I have the same problem too, are there any news about this thread?

                                  ekkescornerE Offline
                                  ekkescornerE Offline
                                  ekkescorner
                                  Qt Champions 2016
                                  wrote on last edited by
                                  #16

                                  @davidesalvetti I also got this from Xiaomi A2 Lite, OS 9, but it went away after setting Target SDK to API 28

                                  ekke ... Qt Champion 2016 | 2024 ... mobile business apps
                                  5.15 --> 6.8 https://t1p.de/ekkeChecklist
                                  QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

                                  1 Reply Last reply
                                  1
                                  • K Offline
                                    K Offline
                                    koahnig
                                    wrote on last edited by
                                    #17

                                    I have updated Qt to version 5.12.1 and IIRC never seen the message again.

                                    Therefore, I have checked and went back to target API level 24 and the message pops up again. Going back to API level 28, the message is coming anymore. I will stay so far with Qt 5.12.1

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

                                    1 Reply Last reply
                                    0

                                    • Login

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