UVCCamera icon indicating copy to clipboard operation
UVCCamera copied to clipboard

Android 11 and 12

Open KanwalKhan-20 opened this issue 3 years ago • 13 comments

No Preview after inserting the camera in Android 11 and 12. What should be the compile and target sdk to get the preview ? @saki4510t

KanwalKhan-20 avatar Jan 10 '22 05:01 KanwalKhan-20

you may try this repo: https://github.com/tsinglink/uvccamera and test with this apk: https://github.com/tsinglink/uvccamera/releases/download/1.0/simpleuvccamera-release.apk

ghost avatar Jan 11 '22 06:01 ghost

compileSdkVersion 28

defaultConfig {
    applicationId "com.example.simpleuvccamera"
    minSdkVersion 21
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"

    signingConfig signingConfigs.debug
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

ghost avatar Jan 11 '22 06:01 ghost

you may try this repo: https://github.com/tsinglink/uvccamera and test with this apk: https://github.com/tsinglink/uvccamera/releases/download/1.0/simpleuvccamera-release.apk

Same preview is not available

KanwalKhan-20 avatar Jan 11 '22 10:01 KanwalKhan-20

@KanwalKhan-20 Can you tell the cpu's of the phones you were using? It seems like the MediaTek processors have this issue with android 11, 12.

Ivan421399 avatar Jan 17 '22 09:01 Ivan421399

@KanwalKhan-20 Can you tell the cpu's of the phones you were using? It seems like the MediaTek processors have this issue with android 11, 12. @iVAN421399 Snapdragon 855 Model Name : Galaxy S10

KanwalKhan-20 avatar Jan 17 '22 12:01 KanwalKhan-20

@KanwalKhan-20 have you tried to change the format, maybe the webcam is MJPEG? Or you already had it working on other phones?

Ivan421399 avatar Jan 17 '22 12:01 Ivan421399

@KanwalKhan-20 have you tried to change the format, maybe the webcam is MJPEG? Or you already had it working on other phones?

@Ivan421399 how to change the format ? Are you asking me to change the camera ?

KanwalKhan-20 avatar Jan 17 '22 17:01 KanwalKhan-20

@Ivan421399 attached are the specifications of camera which I am using. specifications

KanwalKhan-20 avatar Jan 17 '22 17:01 KanwalKhan-20

Well I don't know exactly which example or whatever you're using. I don't remember exactly regarding the examples but if there are settings that you can change from the app interface try to change them. In code however, find the UVCCamera object. Then in it's method "setPreviewSize" try to change the third argument to either FRAME_FORMAT_MJPEG or FRAME_FORMAT_YUYV. Also try to change the resolution in the same method.

Ivan421399 avatar Jan 18 '22 06:01 Ivan421399

Well I don't know exactly which example or whatever you're using. I don't remember exactly regarding the examples but if there are settings that you can change from the app interface try to change them. In code however, find the UVCCamera object. Then in it's method "setPreviewSize" try to change the third argument to either FRAME_FORMAT_MJPEG or FRAME_FORMAT_YUYV. Also try to change the resolution in the same method.

Do you have any update ?

Sumeyya-Eser avatar Aug 03 '22 09:08 Sumeyya-Eser

you may try this repo: https://github.com/tsinglink/uvccamera and test with this apk: https://github.com/tsinglink/uvccamera/releases/download/1.0/simpleuvccamera-release.apk

web page is 404

lichao3140 avatar Feb 01 '23 02:02 lichao3140

@ghost Have you solved this problem? I am having this issue too, still not previewing on Android 12 and 13 devices

BekhruzDev avatar Jun 22 '23 09:06 BekhruzDev

@BekhruzDev Have you ended up finding any solution?

Utsav-Mehta avatar Apr 06 '24 17:04 Utsav-Mehta