Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagedart
import 'package:refinery89_monetize_app/r89_sdk.dart';

2. Android configurations

Manifest permissions

Add the following Permissions for SDK on the top of the manifest file:

Code Block
languagexml
<?xml version="1.0" encoding="utf-8"?>
<manifest>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
</manifest>

Manifest Google ID

Add the App ID to your app's AndroidManifest.xml file. To do so, add a <meta-data> tag with android:name="com.google.android.gms.ads.APPLICATION_ID", and for android:value, insert the App ID, surrounded by quotation marks.

Add this code to the manifest inside the <application> tag:

Code Block
languagexml
<manifest>
  <application>
    <!-- This is the Sample App ID-->
    <meta-data
        android:name="com.google.android.gms.ads.APPLICATION_ID"
        android:value="ca-app-pub-3940256099942544~3347511713"/>
  </application>
</manifest>
Info

You will receive your app ID through your Technical Account manager by email, you can also retrieve them from the web interface after login.

Manifest result

Note

This is a simplified example, you should have many more lines in the manifest, copy the important bits only.

Code Block
languagexml
<manifest>

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
    
    <application>
    
    <!-- This is the Sample App ID-->
    <meta-data
        android:name="com.google.android.gms.ads.APPLICATION_ID"
        android:value="ca-app-pub-3940256099942544~3347511713"/>
        
    </application>
</manifest>