Frage

As specified on this page

Because Android sandboxes applications from each other, applications must explicitly share resources and data. They do this by declaring the permissions they need for additional capabilities not provided by the basic sandbox, including access to device features such as the camera.

In my opinion, it would be more useful to automatically detect the required permissions while compiling the source code. In this way, depending on the classes and methods used in the source code of an application, the compiler could detect the required permissions. So, why Android permissions must be explicitly declared by the developer?

War es hilfreich?

Lösung

Because it is the developer who knows which permissions his application has.

Consider this: a developer does not want his app to access contacts and yet, by mistake, the app accesses them.

If permissions are detected from code, not stated explicitly, such an error would pass unnoticed.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top