Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android user-permission to access Internet

Tags:

android

xml

I am trying to connect to the Internet to access my server from my android application but it doesn't seem to be working. I looked online and found that I had to add

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

right before </manifest>. But when I am doing so, the compiler is showing a warning:

<uses-permission> tag appears after <application> tag   AndroidManifest.xml

Not sure if this warning is causing my code not to work. I tried placing the <user-permission> before the <application> but it still was showing the same warning. What does it imply?

like image 334
noMAD Avatar asked May 10 '12 21:05

noMAD


People also ask

Which permission is used for Internet in Android?

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.

Does Android have full network access permissions?

Network communication — full network access. This permission means exactly what it says. An app wants to be able to send requests and get a response through the network (Wi-Fi or your phone's data connection). Besides apps that use the internet for something obvious, apps with ads in them need this one.


2 Answers

I've got it placed between uses-sdk and application, works for me.

Try to clean your project perhaps.

like image 200
nhaarman Avatar answered Nov 13 '22 08:11

nhaarman


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

Should go after the uses-sdk and the application elements, as far as I know.

like image 35
Juan Cortés Avatar answered Nov 13 '22 10:11

Juan Cortés