Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android internet permission ignored

I have an application that requires the internet permission but it doesn't seem to be working for me.

I added:

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

To the manifest (above the application tag) and when I install the app my phone says: "No permissions requested" and the permission dialog doesn't show up.

However when I replace INTERNET with CAMERA like so:

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

It works fine and shows up under the permissions tab in settings.

Any ideas?

Thanks

like image 729
user265889 Avatar asked Feb 11 '17 09:02

user265889


People also ask

Is Android permission Internet needed?

Note: Both the Internet and ACCESS_NETWORK_STATE permissions are normal permissions, which means they're granted at install time and don't need to be requested at runtime.


2 Answers

If the device is running Android 6.0 (API level 23) and the app's targetSdkVersion is 23 or higher if an app declares in its manifest that it needs a normal permission, the system automatically grants the app that permission at install time.
The system does not prompt the user to grant normal permissions, and users cannot revoke these permissions.

As you can check in the official doc the INTERNET permission is normal.
Instead the CAMERA permission is dangerous.

like image 153
Gabriele Mariotti Avatar answered Sep 18 '22 18:09

Gabriele Mariotti


You're running your app in Android SDK>=23.

Internet permission is under Normal permission so it not show any permission prompt but Camera permission is under Dangerous Permission so it show permission prompt.

If an app declares that it needs a normal permission, the system automatically grants the permission to the app.

https://developer.android.com/guide/topics/permissions/requesting.html

like image 36
Abhishek Aryan Avatar answered Sep 20 '22 18:09

Abhishek Aryan