Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the request for internet persmission required at runtime (Android)?

For Android, it is required that we ask permissions at runtime to make sure users understand better why en when permissions are needed. I know this is true for permissions like WRITE_CALENDAR and ACCESS_FINE_LOCATION but it seems it's not required for INTERNET. Not strange because almost all apps use internet.

Is it safe to say that I only need to declare it in the manifest?

<uses-permission android:name="android.permission.INTERNET" />

Or should I always check it at runtime?

like image 293
Bart Burg Avatar asked Dec 23 '15 12:12

Bart Burg


1 Answers

No, you shouldn't ask for INTERNET permission at runtime.

INTERNET belongs to the Normal permissions group, which are automatically granted by the system if they're declared in the Manifest, as mentioned in this document:

Normal permissions do not directly risk the user's privacy. If your app lists a normal permission in its manifest, the system grants the permission automatically.

like image 131
Egor Avatar answered Sep 30 '22 15:09

Egor