Search code examples
androidandroid-studioadmobandroid-manifest

Is there any Test App ID for your Application?


I am building an Android application in Android Studio and I am implementing AdMob. So, According to the Google AdMob website, you have to add the following in your manifest:-

<manifest>
    <application>
        <!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 -->
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
    </application>
</manifest>

Failure to add this would result in an exception. I am just testing my app and am also using a test AD id for my ads. My question is that what should be the values for the android:name and android:value, if you're just testing your app, because I don't have an actual app ID from AdMob. Thanks for any help.


Solution

  • Remove this code

        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
    

    and use only this code,that's work fine

        <meta-data
            android:name="com.google.android.gms.ads.AD_MANAGER_APP"
            android:value="true"/>