Flutter 3.3.0
or higher
Android
Use Android Studio 3.2 or higher.
Make sure that your app’s build file uses the following values:
A minSdkVersion
of 21
or higher.
A compileSdkVersion
of 28
or higher.
iOS
Use XCode 15.2 or higher.
A minimumDeploymentTarget
is 12
or higher.
Add “Refinery89 Monetize App“ dependency from Pub.dev.
Android configurations.
iOS configurations.
Continue with the implementation type.
Add Refinery89 Monetize App for Flutter plugin to your pubspec.yaml
file.
dependencies: refinery89_monetize_app: |
Install the package by running
flutter packages get |
Import “Refinery89 Monetize App“ into your Flutter app.
import 'package:refinery89_monetize_app/r89_sdk.dart'; |
Add the following Permissions for SDK on the top of the manifest file:
<?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> |
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:
<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> |
You will receive your app ID through your Technical Account manager by email, you can also retrieve them from the web interface after login. |
This is a simplified example, you should have many more lines in the manifest, copy the important bits only. |
<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> |