0

I am working on an app which connect Nikon D3200 camera using usbManager. After connection establishment phone can see liveView on phone and can capture a photo using phone. This app works fine with targetSdkVersion 28 and compileSdkVersion 28, but when I tried to update the target and compile sdk version 33, it unable to connect camera using usbmanager. I have also changed pending intent 0 to FLAG_MUTABLE for Android 12 or higher.

    if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
    mPermissionIntent = PendingIntent.getActivity
            (this, 0, new Intent(ACTION_USB_PERMISSION), PendingIntent.FLAG_MUTABLE);
} else {
    mPermissionIntent = PendingIntent.getActivity
            (this, 0, new Intent(ACTION_USB_PERMISSION), 0);
}

0 Answers0