Recall & Review
beginner
What is the difference between internal and external storage in Android?
Internal storage is private to the app and not accessible by other apps. External storage is shared and can be accessed by other apps and the user. External storage may be removable like an SD card.
Click to reveal answer
beginner
How do you write a text file to internal storage in Kotlin?
Use openFileOutput(filename, Context.MODE_PRIVATE) to get a FileOutputStream, then write bytes or strings to it. This saves the file privately for your app.
Click to reveal answer
intermediate
What permission is required to write to external storage on Android 10 and below?
You need the WRITE_EXTERNAL_STORAGE permission declared in the manifest and requested at runtime for Android 6.0 to 10.
Click to reveal answer
intermediate
What is the recommended way to access shared media files on Android 11 and above?
Use the MediaStore API with scoped storage. Direct file path access is restricted, so apps should use content URIs and system APIs to read/write media.
Click to reveal answer
beginner
How can you check if external storage is available for read and write?
Check Environment.getExternalStorageState() and compare it to Environment.MEDIA_MOUNTED for read/write access.
Click to reveal answer
Which method writes a file to internal storage in Android Kotlin?
✗ Incorrect
openFileOutput() opens a private file in internal storage for writing.
What permission is needed to write files to external storage on Android 9?
✗ Incorrect
WRITE_EXTERNAL_STORAGE permission is required to write to external storage on Android 9.
How do you check if external storage is writable?
✗ Incorrect
Checking if external storage state equals MEDIA_MOUNTED means it is writable.
Which API should you use to access shared media files on Android 11+?
✗ Incorrect
MediaStore API is recommended for accessing shared media files with scoped storage.
Where are files saved when using openFileOutput()?
✗ Incorrect
openFileOutput() saves files in the app's internal storage directory, private to the app.
Explain how to save and read a text file in internal storage using Kotlin in Android.
Think about how you open a file stream to write and read files privately inside your app.
You got /5 concepts.
Describe the changes in Android storage permissions and access from Android 10 to Android 11.
Focus on how Android limits file access for privacy and what APIs replace old methods.
You got /4 concepts.