Hey there, I had this problem where it kept on crashing with the error:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.camera2/com.android.camera.CaptureActivity}: java.lang.NullPointerException: Attempt to get length of null array
After putting this in the manifest:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
The camera app launches onClick and I’m able to take a pic - In data/data/<pkgName>/files
, I see an image is saved (and replaced when re-taking the pic).
Why is this? I’m testing on a S6 and with Android 10 and I don’t even have an external storage?