Android User Permission for Internet Access

I am trying to connect to the Internet to access my server from my Android application, but it does not seem to work. I looked online and found that I need to add

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

before </manifest>. But when I do this, the compiler shows a warning:

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

Not sure if this warning leads to my code not working. I tried posting <user-permission>before <application>, but it still showed the same warning. What does this mean?

+5
source share
5 answers

I placed it between uses-sdkand application, works for me.

Try to clean your project, perhaps.

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

uses-sdk application, .

+2

Moving the use-permission tag before the application tag should have removed the warning. Try a clean project if you use Eclipse.

Do you get an internet permission runtime error when you start the application? What doesn't work for sure?

0
source

Use it inside the tag manifest:

<manifest 
    xmlns:android="http://schemas.android.com/apk/res/android">
    ...
    <uses-permission
    android:name="android.permission.INTERNET"/>
    ...
 </manifest>
0
source

You also need this permission: android.permission.ACCESS_WIFI_STATE

-1
source

All Articles