Recall & Review
beginner
What permission is required to access the camera on Android?
The android.permission.CAMERA permission must be declared in the AndroidManifest.xml file and requested at runtime for Android 6.0 and above.
Click to reveal answer
beginner
How do you launch the camera app to take a photo using an Intent in Kotlin?
Use an Intent with action
MediaStore.ACTION_IMAGE_CAPTURE and start it with startActivityForResult or the modern registerForActivityResult API.Click to reveal answer
intermediate
What is the purpose of
registerForActivityResult in camera access?It replaces
startActivityForResult to handle the result of the camera app in a cleaner, lifecycle-aware way.Click to reveal answer
intermediate
Why do you need to create a file URI before launching the camera Intent?
To save the captured photo, you provide a file URI where the camera app stores the image. This avoids getting only a thumbnail and allows full-size photo saving.
Click to reveal answer
advanced
What is the role of
FileProvider in camera access?FileProvider securely shares file URIs with other apps, like the camera app, avoiding exposing file paths directly.Click to reveal answer
Which permission must be requested at runtime to use the camera on Android 6.0+?
✗ Incorrect
The CAMERA permission is required to access the device camera and must be requested at runtime starting from Android 6.0.
What Intent action is used to open the camera app for capturing a photo?
✗ Incorrect
MediaStore.ACTION_IMAGE_CAPTURE launches the camera app to take a photo.
Which API is recommended for receiving results from the camera Intent in modern Android development?
✗ Incorrect
registerForActivityResult is the modern, lifecycle-aware API to handle activity results.
Why is FileProvider used when sharing a photo file URI with the camera app?
✗ Incorrect
FileProvider securely shares file URIs with other apps, preventing direct file path exposure.
What happens if you do not provide a file URI when launching the camera Intent?
✗ Incorrect
Without a file URI, the camera returns only a small thumbnail image in the Intent result.
Explain the steps to capture a photo using the camera in an Android app with Kotlin.
Think about permissions, file storage, Intent, and result handling.
You got /5 concepts.
Describe why FileProvider is important when working with camera photo files on Android.
Consider Android's file access security model.
You got /4 concepts.