INTERNET permissions in Android M

Regarding Google's recent announcement about Android M and Permissions model.

Per the official Android documentation:

Limited Permissions Granted at Install Time: When the user installs or updates the app, the system grants the app all permissions that the app requests that fall under PROTECTION_NORMAL. For example, alarm clock and internet permissions fall under PROTECTION_NORMAL, so they are automatically granted at install time. The system may also grant the app signature and system permissions, as described in System apps and signature permissions. The user is not prompted to grant any permissions at install time.

Particular note that it says:

...the system grants the app all permissions that the app requests.

So, if the app does not have INTERNET permission in its AndroidManifest.xml, it won't be granted access to INTERNET in that case?

Or will an app require to add INTERNET permission in its manifest in order to be able to make network calls?


As for the specific android.permission.INTERNET permission, it is still mandatory for apps that will access the Internet. If a developer were to publish an app without defining it in the Android manifest, an exception will be thrown the first time a connection attempt is made, and the app will possibly crash. This is no different than before.

All that has changed is that there won't be a prompt to the user, the app will still require the permission in the manifest.


Please check this video from Google IO - https://youtu.be/f17qe9vZ8RM?t=18m10s There is no more Internet permission - the app will have by default access to the internet. Their idea is that if you don't have access to the device data then you can not do anything dangerous

Kind Regards

链接地址: http://www.djcxy.com/p/85688.html

上一篇: 带有&auml的XML文件;

下一篇: Android M中的INTERNET权限