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 qt6

Android camera qt6

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 2 Posters 834 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.
  • L Offline
    L Offline
    Lilde
    wrote on last edited by
    #1

    Hello,

    I'm trying to build use camera on android but I have access authorization problems :

    E libc : Access denied finding property "camera.hal1.packagelist"
    I FeatureParser: can't find capricorn.xml in assets/device_features/,it may be in /system/etc/device_features
    E libc : Access denied finding property "camera.hal1.packagelist"
    E libc : Access denied finding property "camera.hal1.packagelist"
    W System.err: java.lang.RuntimeException: setParameters failed
    W System.err: at android.hardware.Camera.native_setParameters(Native Method)
    W System.err: at android.hardware.Camera.setParameters(Camera.java:2098)
    W System.err: java.lang.RuntimeException: setParameters failed
    W System.err: at android.hardware.Camera.native_setParameters(Native Method)
    W System.err: at android.hardware.Camera.setParameters(Camera.java:2098)

    Same problems with declarative camera example or with minimal example.

    This app works well on IOS but camera access seems to be denied despite the android.permission.camera in android manifest.

    Have you any idea to get the access ?

    Link to the bug ticket : https://bugreports.qt.io/browse/QTBUG-101391

    J.HilkJ 1 Reply Last reply
    0
    • L Lilde

      Hello,

      I'm trying to build use camera on android but I have access authorization problems :

      E libc : Access denied finding property "camera.hal1.packagelist"
      I FeatureParser: can't find capricorn.xml in assets/device_features/,it may be in /system/etc/device_features
      E libc : Access denied finding property "camera.hal1.packagelist"
      E libc : Access denied finding property "camera.hal1.packagelist"
      W System.err: java.lang.RuntimeException: setParameters failed
      W System.err: at android.hardware.Camera.native_setParameters(Native Method)
      W System.err: at android.hardware.Camera.setParameters(Camera.java:2098)
      W System.err: java.lang.RuntimeException: setParameters failed
      W System.err: at android.hardware.Camera.native_setParameters(Native Method)
      W System.err: at android.hardware.Camera.setParameters(Camera.java:2098)

      Same problems with declarative camera example or with minimal example.

      This app works well on IOS but camera access seems to be denied despite the android.permission.camera in android manifest.

      Have you any idea to get the access ?

      Link to the bug ticket : https://bugreports.qt.io/browse/QTBUG-101391

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @Lilde having the permission only on the manifest is no longer enough, on modern android devices,

      you have to request permission before usage, so that the user gets a popup and can opt out of your app using the camera.

      The QtAndroid namespace has a special set of functions you can use, just for this:

      https://doc.qt.io/qt-5/qtandroid.html#requestPermissions
      and
      https://doc.qt.io/qt-5/qtandroid.html#requestPermissionsSync


      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.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        Lilde
        wrote on last edited by Lilde
        #3

        Ok, thanks you. I try with this function.
        EDIT : Hum, This function is for Qt5, have you the way to do it in Qt6 ?

        J.HilkJ 1 Reply Last reply
        0
        • L Lilde

          Ok, thanks you. I try with this function.
          EDIT : Hum, This function is for Qt5, have you the way to do it in Qt6 ?

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @Lilde seems now to be here:
          https://doc.qt.io/qt-6/qtandroidprivate.html


          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.

          1 Reply Last reply
          1

          • Login

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