Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. QtMultimedia Camera Not Work Android 10
Forum Update on Monday, May 27th 2025

QtMultimedia Camera Not Work Android 10

Scheduled Pinned Locked Moved Unsolved Qt 6
4 Posts 2 Posters 448 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by A Former User
    #1

    Hello, I want to use the camera with QML on Android 10, but I cannot see the camera output in any way. My codes are as follows, am I doing something missing?

    import QtQuick
    import QtQuick.Controls
    import QtQuick.Layouts
    import QtMultimedia
    
    Page {
        MediaDevices {
            id: deviceList
        }
    
        Camera {
            id: mainCamera
            active: true
            cameraDevice: deviceList.defaultVideoInput
            focusMode: Camera.FocusModeAutoNear
        }
    
        CaptureSession {
            camera: mainCamera
            videoOutput: videoOutput
        }
    
        VideoOutput {
            id: videoOutput
            anchors.fill: parent
            fillMode: VideoOutput.PreserveAspectFit
        }
    }
    
    eyllanescE 1 Reply Last reply
    0
    • ? A Former User

      Hello, I want to use the camera with QML on Android 10, but I cannot see the camera output in any way. My codes are as follows, am I doing something missing?

      import QtQuick
      import QtQuick.Controls
      import QtQuick.Layouts
      import QtMultimedia
      
      Page {
          MediaDevices {
              id: deviceList
          }
      
          Camera {
              id: mainCamera
              active: true
              cameraDevice: deviceList.defaultVideoInput
              focusMode: Camera.FocusModeAutoNear
          }
      
          CaptureSession {
              camera: mainCamera
              videoOutput: videoOutput
          }
      
          VideoOutput {
              id: videoOutput
              anchors.fill: parent
              fillMode: VideoOutput.PreserveAspectFit
          }
      }
      
      eyllanescE Offline
      eyllanescE Offline
      eyllanesc
      wrote on last edited by
      #2

      @NullByte Does it work for you in any version of android? If so then report the bug, also in that bug ask the supported android versions.

      If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

      ? 1 Reply Last reply
      0
      • eyllanescE eyllanesc

        @NullByte Does it work for you in any version of android? If so then report the bug, also in that bug ask the supported android versions.

        ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        @eyllanesc said in QtMultimedia Camera Not Work Android 10:

        @NullByte Does it work for you in any version of android? If so then report the bug, also in that bug ask the supported android versions.

        I tried it on android 10 and android 11, both of them did not open the camera. In Android 10, I get outputs like this, I think the camera is turned on and off automatically.

        I Camera  : open camera: 0, package name: com.package.camera
        D HwFrameworkSecurityPartsFactory: HwFrameworkSecurityPartsFactory in.
        I HwFrameworkSecurityPartsFactory: add HwFrameworkSecurityPartsFactory to memory.
        I HwCameraUtil: notifySurfaceFlingerCameraStatus : isFront = false , isOpend = true
        I Camera  : close camera: 0, package name:com.package.camera
        I HwCameraUtil: notifySurfaceFlingerCameraStatus : isFront = false , isOpend = false
        I Camera  : open camera: 1, package name: com.package.camera
        I HwCameraUtil: notifySurfaceFlingerCameraStatus : isFront = true , isOpend = true
        I HwCameraUtil: notifySurfaceFlingerFrontCameraStatus 8011 transact success!
        I Camera  : close camera: 1, package name: com.package.camera
        I HwCameraUtil: notifySurfaceFlingerCameraStatus : isFront = true , isOpend = false
        I HwCameraUtil: notifySurfaceFlingerFrontCameraStatus 8012 transact success!
        W IInputConnectionWrapper: getExtractedText on inactive InputConnection
        W IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection
        W libEGL  : EGLNativeWindowType 0x74bfbe4010 disconnect failed
        
        

        What can we do about this issue? Is this a mistake or am I doing something wrong?

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          Any idea?

          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