0

Our app will be targeting Android Q once it's released. I've updated my Pixel 3 XL to test our existing app and have found an issue with the camera screen. The app has never had an issue here before and only crashes when my phone is running Android Q.

If I go into the settings and deny the camera permission our app asks for it to be granted again. Once the permission is granted the camera screen works fine and doesn't crash until I leave and go back into it. Is this just a bug with Android Q or are they handling camera permissions differently?

I've looked through the documentation and see that there are permission changes but them seem to only affect the app if you're wanting to record the screen of a users device.

The crash it gives is a KotlinNullPointerException when we're building the preview screen after we go back into the record screen. As stated above this works fine in Android P and when the camera permission has been reset.

AngryCubeDev
  • 155
  • 2
  • 16
  • 1
    can you please add your code where you are getting null pointer.. – Abdul Waheed Jul 16 '19 at 15:02
  • @AbdulWaheed The null pointer is when we are trying to get the cameraID but this code works as explained above in Android P to Android O. These are the versions we are targeting – AngryCubeDev Jul 16 '19 at 15:09
  • Describing your logcat doesn't help. Adding the code of your logcat will lead to better answers. – Nikos Hidalgo Jul 16 '19 at 15:12
  • `kotlin.KotlinNullPointerException at com.securebroadcast.sbandroidclient.screens.record.CameraPreview.startPreview(CameraPreview.kt:58) at com.securebroadcast.sbandroidclient.screens.record.Camera.startPreview(Camera.kt:131) at com.securebroadcast.sbandroidclient.screens.record.CameraFragment.onCameraOpened(CameraFragment.kt:219) at com.securebroadcast.sbandroidclient.screens.record.Camera.onOpened(Camera.kt:142) at android.hardware.camera2.impl.CameraDeviceImpl$1.run(CameraDeviceImpl.java:145)` – AngryCubeDev Jul 16 '19 at 15:23

0 Answers0