Question

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?

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top