Mobile sandbox and permissions
Why isolation matters
A mobile sandbox limits what an app can access by default. Android isolates apps using operating-system identities and additional controls; iOS limits app access through its sandbox and entitlements. In our fictional CampusNotes app, a student reads course notes, not contacts or location. The operating system boundary helps prevent an unrelated app from reading its private files. It does not replace the server’s check that the student may read a particular note.
Permission is a capability, not a purpose
Map features to data and permission requests before coding. Android INTERNET is normally granted at installation; sensitive runtime permissions are different and can be refused or revoked. On iOS, protected resources may require a purpose description and user authorization; entitlements govern other capabilities. Exact behavior depends on platform and OS version. Prefer system document pickers for a user-selected file instead of broad storage access.
Review the manifest
The supplied AndroidManifest.xml declares INTERNET and an explicit non-exported notes activity; the fictional main screen is not modeled as a launcher. For the read-only online feature, INTERNET has a reason and contacts do not. In a release review inspect the merged manifest, dependencies and component exposure, not only the source manifest. A component that must be exposed needs a documented reason and independent input and authorization checks. The fragment is not a buildable app.
Handle refusal and lifecycle
Suppose an optional attachment feature is added. If a picker is canceled, retain the draft and show a useful message; do not make unrelated functions unavailable. Test first use, denial, revocation and app upgrades. A grant observed yesterday does not establish access today. An app sandbox also cannot repair overly broad server privileges, unsafe dependencies or data sent by the app itself.
Practice a capability review
Open the local manifest and feature records. Write a table of required capability, purpose, data type, denial behavior and owner. Predict the review label for each manifest case. A missing required declaration is a functional gap; an unnecessary one is a minimization gap; neither is proof of compromise. Next choose a protected storage and transport design.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Mobile sandbox and permissions — knowledge check
Review Mobile permissions, storage, transport, BYOD and verification.
What does a mobile sandbox primarily constrain?
CampusNotes reads online course notes. Which declared capability is justified?
What should happen when an optional picker is canceled?
Which manifest is important for release review?
What does local app permission not establish?