0

I have a strange issue with the Android camera on Android 13. My Application has a package name with a length that's greater than 30. Whatever I do, e.g com.google.mlkit.barcode.Barcode , or creating a surface with androidx.camera, its always the same.Everything works fine until Android 12 and does not work with android 13.

But When I use a Flavour with a shorter package name (30 oder less), it works.

I reported this issue to google, but changing my flavours to shorter ones is not really an option in a productiv running app, does anyone have any idea how to avoid this?

I already updated target ad compiled sdk to 33 and use the newest stable versions of all implementations.

I have the following output in my logcat, if i start a surface on Android 13 with a long package name and the sreec stays just black:

CameraRepository de....Sass.dimadimadimadimadimadima D Added camera: 1 Camera2CameraInfo de....Sass.dimadimadimadimadimadima I Device Level: INFO_SUPPORTED_HARDWARE_LEVEL_3 CameraValidator de....Sass.dimadimadimadimadimadima D Verifying camera lens facing on SCW_sprout, lensFacingInteger: null [...] DeferrableSurface de....Sass.dimadimadimadimadimadima D Surface created[total_surfaces=2, used_surfaces=0](androidx.camera.core.impl.ImmediateSurface@ce8aba5} DeferrableSurface de....Sass.dimadimadimadimadimadima D Surface created[total_surfaces=3, used_surfaces=0](androidx.camera.core.impl.ImmediateSurface@523af88} Camera2CameraImpl de....Sass.dimadimadimadimadimadima D {Camera@b0329a4[id=0]} Use case ImageCapture:androidx.camera.core.ImageCapture-f64980f6-eaa9-435a-819f-8c8db175888e ACTIVE PreviewView de....Sass.dimadimadimadimadimadima D Surface requested by Preview. UseCaseAttachState de....Sass.dimadimadimadimadimadima D Active and attached use case: [] for camera: 0 Camera2CameraImpl de....Sass.dimadimadimadimadimadima D {Camera@b0329a4[id=0]} Use case Preview:androidx.camera.core.Preview-a1671e1e-e37b-4ab4-b0ad-8cd7ee2a695e ACTIVE

Camera2CameraImpl de....Sass.dimadimadimadimadimadima D {Camera@b0329a4[id=0]} Resetting Capture Session Camera2CameraImpl de....Sass.dimadimadimadimadimadima D {Camera@b0329a4[id=0]} Releasing session in state INITIALIZED Camera2CameraImpl de....Sass.dimadimadimadimadimadima D {Camera@b0329a4[id=0]} Attempting to force open the camera. CameraStateRegistry de....Sass.dimadimadimadimadimadima D tryOpenCamera(Camera@b0329a4[id=0]) [Available Cameras: 1, Already Open: false (Previous state: null)] --> SUCCESS CameraStateRegistry de....Sass.dimadimadimadimadimadima D Recalculating open cameras:


Camera@b0329a4[id=0] OPENING Camera@49590e[id=1] UNKNOWN

Open count: 1 (Max allowed: 1)

Camera2CameraImpl de....Sass.dimadimadimadimadimadima D {Camera@b0329a4[id=0]} Opening camera. Camera2CameraImpl de....Sass.dimadimadimadimadimadima D {Camera@b0329a4[id=0]} Transitioning camera internal state: INITIALIZED --> OPENING CameraStateMachine de....Sass.dimadimadimadimadimadima D New public camera state CameraState{type=OPENING, error=null} from OPENING and null CameraStateMachine de....Sass.dimadimadimadimadimadima D Publishing new public camera state CameraState{type=OPENING, error=null} UseCaseAttachState de....Sass.dimadimadimadimadimadima D All use case: [androidx.camera.core.ImageCapture-f64980f6-eaa9-435a-819f-8c8db175888e89172630, androidx.camera.core.ImageAnalysis-98e2e014-5983-45be-9438-697f6ebd4550206087601, androidx.camera.core.Preview-a1671e1e-e37b-4ab4-b0ad-8cd7ee2a695e2326616] for camera: 0 libc de....Sass.dimadimadimadimadimadima W Access denied finding property "persist.vendor.camera.privapp.list" CameraService pid-1414 I CameraService::connect call (PID -1 "de.supinfo.FISass.dimadimadimadimadimadima", camera ID 0) and Camera API version 2 CameraService pid-1414 I [hmdcb] CameraService::makeClient call (PID 25019 "de.supinfo.FISass.dimadimadimadimadimadima", camera ID 0) and Camera API version 2, g_isCTS 0, g_isCTS_V 0, Camera2ClientBase pid-1414 I Camera 0: Opened. Client: de.supinfo.FISass.dimadimadimadimadimadima (PID 25019, UID 10007) libc de....Sass.dimadimadimadimadimadima W Access denied finding property "vendor.camera.aux.packagelist" CameraManagerGlobal de....Sass.dimadimadimadimadimadima E Camera 5 is not available. Ignore physical camera status change libc de....Sass.dimadimadimadimadimadima W Access denied finding property "vendor.camera.aux.packagelist" libc de.supinfo.FISass.pct W Access denied finding property "vendor.camera.aux.packagelist"`

Taslim Oseni
  • 6,086
  • 10
  • 44
  • 69

0 Answers0