Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android.permission.INTERNET?

Tags:

android

I'm using three buttons in my app 1) Feedback button: It allows the user to send feedback via any mail application 2) A share button which uses a share intent 3) A "rate app" button which opens my app's page on the play store

All the 3 buttons uses other applications to access the internet.

Do I need to add the android.permission.INTERNET permission in my manifest file?

like image 754
user1951690 Avatar asked Feb 05 '13 10:02

user1951690


2 Answers

The answer in this case is that no, the permissions are not required in this instance, as Dipendra has pointed out in his answer, as the application is sending it's requests as Intents via external applications and aren't direct requests to the network from within his application.

A little background:

The easiest way you can know whether you need the permission is to use your application on a test device. Does it work as you intended it? Do you get any errors without the INTERNET permission?

If you do, then its clear that you need it! If not (and in the case of this question's scenario), you do not need the INTERNET permission.

The permissions are there as a security feature.

The permission in question is:

public static final String INTERNET

Allows applications to open network sockets.

Constant Value: "android.permission.INTERNET"

If your application needs network sockets, then your application needs permission to use them. Simple as that.

Add the below line to your manifest if you require the permission:

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

The permissions are there to protect the user, so it is about being upfront and clear of what your applications intentions are.

like image 144
biddulph.r Avatar answered Sep 26 '22 03:09

biddulph.r


No you don't need the permission to access internet. Because, all of your internet related tasks are handed over to other applications.

like image 34
Dipendra Avatar answered Sep 26 '22 03:09

Dipendra