Re: You must have INTERNET and ACCESS_NETWORK_STATE permission in AndroidManifest.xml

2,194 views
Skip to first unread message

Eric Leichtenschlag

unread,
May 14, 2013, 2:09:38 PM5/14/13
to google-adm...@googlegroups.com
Hey Riddle,

I see you have <user-permission> instead of <uses-permission> for the access network state permission. My guess is that's why the permission isn't being applied properly.

Cheers,
Eric

On Saturday, May 11, 2013 8:37:05 PM UTC-7, Riddle wrote:
I received the message " You must have INTERNET and ACCESS_NETWORK_STATE permission in AndroidManifest.xml" and unable to see the ads in the app . I have already had those permission in the xml file. 

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

and this as well 

<activity android:name="com.google.ads.AdActivity" 
android:configChanges= "keyboard|keyboardHidden|orientation|screenLayout| 
uiMode|screenSize|smallestScreenSize"/> 

Samsung Note2 

Here is my AndroidManifest.xml and thanks in Advance.


<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.app"
    android:versionCode="10"
    android:versionName="10" >
    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17"/>
    <uses-feature android:glEsVersion="0x00020000" android:required="true"/>
    
<permission
          android:name="com.example.app.permission.MAPS_RECEIVE"
          android:protectionLevel="signature"/>
    <uses-permission android:name="com.example.app.permission.MAPS_RECEIVE"/>
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>

    <uses-permission android:name="android.permission.INTERNET"/>
    <user-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>  
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>

    <application
        android:allowBackup="true"
        android:icon="@drawable/launcher"
        android:label="@string/app_name_long"
        >
        <activity android:name=".BaseActivity" 
            android:configChanges="keyboardHidden|orientation|screenLayout|screenSize"
            android:theme="@style/StyledIndicators">
            
        </activity>
        
        <activity
            android:name=".MainActivity" android:noHistory="true"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".UiTest"    android:theme="@style/StyledIndicators">
        </activity>
        <activity 
            android:name=".FragmentContainer"  android:theme="@style/StyledIndicators"
            android:configChanges="keyboardHidden|orientation|screenLayout|screenSize">            
        </activity>
        <activity 
            android:name=".UiAbout" android:theme="@style/StyledIndicators">            
        </activity>
        <activity 
            android:name=".UiMapFragment" android:theme="@style/StyledIndicators"
             android:configChanges="keyboardHidden|orientation|screenLayout|screenSize" >            
        </activity>
        <activity android:name="com.google.ads.AdActivity"                  android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
 
        <receiver  android:process=":remote" android:name="com.example.app.rec.Alarm"></receiver>
         <service android:name="com.example.app.svc.SvcNotification" ></service>
         <service android:name="com.example.app.svc.SvcTiming" ></service>
         
         <meta-data
   android:name="com.google.android.maps.v2.API_KEY"
   android:value="xxx"/>
         
    </application>
</manifest>
Reply all
Reply to author
Forward
0 new messages