Android Application Development (AND-401) — Question 54
Which of the following is correct about file access in the Android system?
Answer options
- A. Generally, files are handled as dedicated resources per each application.
- B. Files created by an application can be directly accessed by any application.
- C. The content of file created by application cannot be accessed by any other application.
- D. You can only access a file from within an Activity.
Correct answer: A
Explanation
The correct answer is A because, in Android, each application operates in its own sandbox, treating files as dedicated resources that cannot be accessed by other apps. Option B is incorrect as it suggests that files are universally accessible, which is not the case. Option C is misleading because, while direct access is restricted, there are techniques such as content providers that allow sharing. Option D is wrong because file access is not limited to Activities; it can be done from other components as well.