Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
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 yourapp ID through your Technical Account manager by email, you can also retrieve them from the web interface after login.
Manifest end result
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>
3. iOS configurations
Add Info.plist Google App Id
Add the GADApplicationIdentifier to your info.plist file.
Since iOS 14 Apple introduced the Apple Tracking Transparency framework, which requires that every app needs to disclose what tracking data they collect.
For the R89SDK, after showing the Consent Management Platform (CMP) we will automatically display the ATT permission dialog.
To configure the ATT request dialog in your app add the NSUserTrackingUsageDescription to the app’s Info.plist.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
...
<key>NSUserTrackingUsageDescription</key>
<string>This app uses your data to provide personalized ads and improve user experience.</string>
...
</dict>
</plist>
Use the same description text or one that better fits your app's purpose.
iOS will crash application on attempting to display the ATT popup if the NSUserTrackingUsageDescription is missing in the Info.plist.
Background Task Configuration
With the purpose of providing better analytics the R89SDK needs to track the advertisement session while the application is in the background. It internally uses the BgTaskScheduler and BGAppRefreshTask from the iOS framework. Before enabling the background modes add the “Background Modes“ capability to your project.
After adding the “Background Modes“ capability enable both “Background fetch“ and “Background processing“ modes.
Next, in your Info.plist, add the task identifier com.refinery89.background under the BGTaskSchedulerPermittedIdentifiers key. Here's how it should look:
This Implementation provides a way that with minimal code you can remotely control where and how to show the ad inventory. You will have full remote control over Ad Inventory configurations and with the addition of tags to your wrapper, you will have where you show the inventory.
This is the easiest monetization setup because all configurations for the Units are done in the Remote Server, you just need to add the tags on the “white spaces of your app” where you might or might not place ads, so no need to manually request the ads in those places.
This option is recommended under the following circumstances:
Your app is native and you can add tags to your views
Wants to Disable and enable Inventory slots without updating the application.
Wants to Edit the ad units remotely over the web without updating the application.
This implementation is designed for situations where the Single tag might not align with your requirements, but you can still leverage the benefits of remote inventory configuration.
Manual configuration means that you have remote control of General Ad Settings over the web or our tech support, but you need to add the ads manually, so instead of just placing the tags you need to create a wrapper and use it to do a request for the format that you want.
This option is recommended under the following circumstances:
Wants control over the logic of showing the Inventory.
You are using a framework that we don’t support but you can use native android code.
You have a web application but you are not using our monetization in your web and want to place ads natively.