On Android, the first time the application is opened (or if the camera permission is never granted), the app will crash.
In the onActivityResult method, if the resultCode is an error, you are never checking if the intent is null. In the case where the permission is not granted, the intent is null, so the app will crash.
Hello,
On Android, the first time the application is opened (or if the camera permission is never granted), the app will crash.
In the
onActivityResult
method, if theresultCode
is an error, you are never checking if the intent is null. In the case where the permission is not granted, the intent is null, so the app will crash.