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. Mobile app crash on Android 13

Mobile app crash on Android 13

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 3 Posters 1.0k Views 1 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.
  • C Offline
    C Offline
    Creatorczyk
    wrote on last edited by
    #1

    Hi,
    I raised the API of my mobile application written in Qt5.15 to 33. From now on, after uploading the application to the phone, the application turns on for 1 second and then turns off if it is Android 13. There is no such problem on Android 11. What may be the problem?

    I don't get much information in the console. How could I identify the problem?

    jsulmJ 1 Reply Last reply
    0
    • C Creatorczyk

      Hi,
      I raised the API of my mobile application written in Qt5.15 to 33. From now on, after uploading the application to the phone, the application turns on for 1 second and then turns off if it is Android 13. There is no such problem on Android 11. What may be the problem?

      I don't get much information in the console. How could I identify the problem?

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Creatorczyk said in Mobile app crash on Android 13:

      How could I identify the problem?

      Did you run through debugger?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      C 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Creatorczyk said in Mobile app crash on Android 13:

        How could I identify the problem?

        Did you run through debugger?

        C Offline
        C Offline
        Creatorczyk
        wrote on last edited by Creatorczyk
        #3

        @jsulm Hi, I found the cause of the error. It turns out that Android 13 withdrew the "WRITE_EXTERNAL_STORAGE" permissions.
        https://medium.com/@muhammadbilal4074/storage-permission-in-android-13-89372e543864

        auto result = QtAndroid::checkPermission(QString("android.permission.WRITE_EXTERNAL_STORAGE"));
        if(result == QtAndroid::PermissionResult::Denied){
                QtAndroid::PermissionResultMap resultHash = QtAndroid::requestPermissionsSync(QStringList({"android.permission.WRITE_EXTERNAL_STORAGE"}));
                if(resultHash["android.permission.WRITE_EXTERNAL_STORAGE"] == QtAndroid::PermissionResult::Denied){
                    return 0;
        }
        }
        

        I removed these permissions, but I think I need them to read the SQLite database. Because the application closes when you try to perform an operation on it. I also tried replacing it with "READ_MEDIA_IMAGES" but it didn't help.

        auto result = QtAndroid::checkPermission(QString("android.permission.READ_MEDIA_IMAGES"));
        if(result == QtAndroid::PermissionResult::Denied){
               QtAndroid::PermissionResultMap resultHash = QtAndroid::requestPermissionsSync(QStringList({"android.permission.READ_MEDIA_IMAGES"}));
               if(resultHash["android.permission.READ_MEDIA_IMAGES"] == QtAndroid::PermissionResult::Denied){
                       return 0;
               }
        

        How could I fix this error?

        jsulmJ ekkescornerE 2 Replies Last reply
        0
        • C Creatorczyk

          @jsulm Hi, I found the cause of the error. It turns out that Android 13 withdrew the "WRITE_EXTERNAL_STORAGE" permissions.
          https://medium.com/@muhammadbilal4074/storage-permission-in-android-13-89372e543864

          auto result = QtAndroid::checkPermission(QString("android.permission.WRITE_EXTERNAL_STORAGE"));
          if(result == QtAndroid::PermissionResult::Denied){
                  QtAndroid::PermissionResultMap resultHash = QtAndroid::requestPermissionsSync(QStringList({"android.permission.WRITE_EXTERNAL_STORAGE"}));
                  if(resultHash["android.permission.WRITE_EXTERNAL_STORAGE"] == QtAndroid::PermissionResult::Denied){
                      return 0;
          }
          }
          

          I removed these permissions, but I think I need them to read the SQLite database. Because the application closes when you try to perform an operation on it. I also tried replacing it with "READ_MEDIA_IMAGES" but it didn't help.

          auto result = QtAndroid::checkPermission(QString("android.permission.READ_MEDIA_IMAGES"));
          if(result == QtAndroid::PermissionResult::Denied){
                 QtAndroid::PermissionResultMap resultHash = QtAndroid::requestPermissionsSync(QStringList({"android.permission.READ_MEDIA_IMAGES"}));
                 if(resultHash["android.permission.READ_MEDIA_IMAGES"] == QtAndroid::PermissionResult::Denied){
                         return 0;
                 }
          

          How could I fix this error?

          jsulmJ Online
          jsulmJ Online
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Creatorczyk said in Mobile app crash on Android 13:

          Because the application closes when you try to perform an operation on it

          So, did you investigate why? Run through debugger to see what happens.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • C Creatorczyk

            @jsulm Hi, I found the cause of the error. It turns out that Android 13 withdrew the "WRITE_EXTERNAL_STORAGE" permissions.
            https://medium.com/@muhammadbilal4074/storage-permission-in-android-13-89372e543864

            auto result = QtAndroid::checkPermission(QString("android.permission.WRITE_EXTERNAL_STORAGE"));
            if(result == QtAndroid::PermissionResult::Denied){
                    QtAndroid::PermissionResultMap resultHash = QtAndroid::requestPermissionsSync(QStringList({"android.permission.WRITE_EXTERNAL_STORAGE"}));
                    if(resultHash["android.permission.WRITE_EXTERNAL_STORAGE"] == QtAndroid::PermissionResult::Denied){
                        return 0;
            }
            }
            

            I removed these permissions, but I think I need them to read the SQLite database. Because the application closes when you try to perform an operation on it. I also tried replacing it with "READ_MEDIA_IMAGES" but it didn't help.

            auto result = QtAndroid::checkPermission(QString("android.permission.READ_MEDIA_IMAGES"));
            if(result == QtAndroid::PermissionResult::Denied){
                   QtAndroid::PermissionResultMap resultHash = QtAndroid::requestPermissionsSync(QStringList({"android.permission.READ_MEDIA_IMAGES"}));
                   if(resultHash["android.permission.READ_MEDIA_IMAGES"] == QtAndroid::PermissionResult::Denied){
                           return 0;
                   }
            

            How could I fix this error?

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

            @Creatorczyk which version of 5.15 are you using ?

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

            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