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. Android + Camera + first launch freezes the app after permissions acquired

Android + Camera + first launch freezes the app after permissions acquired

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 3 Posters 296 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.
  • V Offline
    V Offline
    Vega4
    wrote on last edited by Vega4
    #1

    Case: The app freezes the entire UI, the window is not constructed properly (which contains a full screen QML VideoOutput from Camera with some additions. user has a feeling like he needs to restart his mobile as for some reason the unprepared QT app freezes the entire UI.

    When: This happens only the first time the app is launched and AFTER the permissions have been acquired (synchronously and verified) I construct the UI after permissions granted.. Ideas?

    Update/Reason: it seems like Application::onPermissionsGranted is NEVER fired after permissions granted when the app i launched for the very first time AFTER privileges acquired, now why would that be? In consecutive runs Application::onPermissionsGranted fires immediately upon launch.

    Now, of course I construct UI elements ONLY after such a confirmation acquired.....sadly never happens when launched for the very first time. And the first launch seems like the case when such an event would make sense the most, right?

    ekkescornerE 1 Reply Last reply
    1
    • V Offline
      V Offline
      Vega4
      wrote on last edited by Vega4
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • SeDiS Offline
        SeDiS Offline
        SeDi
        wrote on last edited by
        #3

        I have encountered the very same problem, but I haven't managed to find a solution for it yet.

        I am using QZXing library in my app to scan bar codes.
        FWIW:
        QZXing defines its native onPermissionGranted / onPermissionDenied static function this way:

        native.cpp

        Any light shed on this matter would be gratefully appreciated, indeed!

        1 Reply Last reply
        0
        • V Vega4

          Case: The app freezes the entire UI, the window is not constructed properly (which contains a full screen QML VideoOutput from Camera with some additions. user has a feeling like he needs to restart his mobile as for some reason the unprepared QT app freezes the entire UI.

          When: This happens only the first time the app is launched and AFTER the permissions have been acquired (synchronously and verified) I construct the UI after permissions granted.. Ideas?

          Update/Reason: it seems like Application::onPermissionsGranted is NEVER fired after permissions granted when the app i launched for the very first time AFTER privileges acquired, now why would that be? In consecutive runs Application::onPermissionsGranted fires immediately upon launch.

          Now, of course I construct UI elements ONLY after such a confirmation acquired.....sadly never happens when launched for the very first time. And the first launch seems like the case when such an event would make sense the most, right?

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

          @Vega4 said in Android + Camera + first launch freezes the app after permissions acquired:

          And the first launch seems like the case when such an event would make sense the most, right?

          user can remove permission at any time
          so you should always before you need the Camera check the permission again - not only at startup

          and for the first launch you should perhaps show a small window "waiting for Camera Permission..." or so until permission granted

          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
          2

          • Login

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