Hello ,
I have built an object recognition application which uses sentis model .It uses webcam texture on a raw image .The application works fine on PC ( Windows) but not on Android.
Below are my project settings. What could be the reason? I am after this issue from past 2 weeks with no success. I am using Samsung Galaxy Tab 7 Android 12 . I have already given the camera permission.
Please assist. Thanks in advance .Ask me for any information.
This is my code :
WebCamDevice[ ] devices = WebCamTexture.devices;
webcamTexture = new WebCamTexture(1920, 1080);
webcamTexture.deviceName = devices[0].name;
webcamTexture.Play();
I am using Unity 2023.3.0b5
Thanks and Regards,
Saurabh
Start with the Android device logs. There’s probably error(s) being displayed. Google for how to get the logs, then address the errors you’re actually having.
it says : 04-08 22:14:13.347 3661 4364 I CameraManagerGlobal: postSingleUpdate device: camera id 0 status STATUS_NOT_AVAILABLE , I have Already given permission in the settings>app>myApp
Why camera is not available?
04-08 22:14:13.326 1398 11783 I CameraService: CameraService::validateClientPermissionsLocked is ok : calling pid 8510, calling uid 10376, client com.DefaultCompany.myapp , cameraservice pid=1398, device user 0, currently allowed device users: 0
04-08 22:14:13.326 1398 11783 I CameraService: CameraService::handleEvictionsLocked
04-08 22:14:13.328 1398 11783 I CameraService: wouldEvictLocked: [incoming client] owner = 8510, priority-score=0, cost=100, returnIncompatibleClients=false
04-08 22:14:13.328 1398 11783 I CameraService: wouldEvictLocked: [cost info] current cost=0, adding cost=100, total cost=100, max cost=100
04-08 22:14:13.328 1398 11783 I CameraService: wouldEvictLocked: [highestPriority] owner=8510, score=0
04-08 22:14:13.328 1398 11783 I CameraFlashlight: prepareDeviceOpen: prepare for device open(cameraId=0)
04-08 22:14:13.332 1398 11783 D Camera3-RequestInjector: RequestInjector[0] Mapper created
04-08 22:14:13.333 1398 11783 I Camera2ClientBase: Camera 0: Opened. Client: com.DefaultCompany.myapp (PID 8510, UID 10376)
04-08 22:14:13.333 1398 11783 I CameraDeviceClient: CameraDeviceClient 0: Opened
04-08 22:14:13.333 1398 11783 I CameraService: isSamsungCamera: this package is Samsung app: false
04-08 22:14:13.335 1398 11783 I CameraService: service.camera.client set to com.DefaultCompany.myapp
04-08 22:14:13.337 1398 11783 I CameraService: startCameraOps: Start camera ops, package name = com.DefaultCompany.myapp, client UID = 10376
04-08 22:14:13.339 1398 11783 I CameraService: increaseCamConnRef: ref=1
04-08 22:14:13.340 1398 11783 I CameraService: increaseCamConnRef: service.camera.running set to 1
04-08 22:14:13.343 1398 11783 D Camera3-Device: CameraPerf: initialize E
04-08 22:14:13.343 1398 11783 D Camera3-Device: initialize: mInterfaceLock.lock()
04-08 22:14:13.344 3661 4364 I CameraManagerGlobal: postSingleUpdate device: camera id 0 status STATUS_NOT_AVAILABLE
04-08 22:14:13.346 1398 11783 D CameraProviderManager: CameraPerf: openSession E
04-08 22:14:13.347 3661 4364 I CameraManagerGlobal: postSingleUpdate device: camera id 0 status STATUS_NOT_AVAILABLE
04-08 22:14:13.376 1051 1310 I CamX : [CONFIG][HAL ] camxhal3.cpp:575 open() wt_hal open_camera:E
04-08 22:14:13.379 1051 1310 I CamX : [CONFIG][HAL ] camxhal3.cpp:480 WingMapCameraID() WingMapCameraID cam_pos = 5 cameraID:0
What has googling for those exact errors revealed to you?
Remember: you likely have an INCREDIBLY common boring yawner seen-ten-million-times-before error. Go find the other million people online who had this error and posted about it.
I suggest changing your mindset from “But I have done ALL THE THINGS!” into:
“I have done some things, there MUST be something I forgot. What can Google tell me based on the errors I am getting?”
1 Like