Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel6
outlinefalse
styledefault
typelist
printabletrue

Prerequisites

  • Use Android Studio 3.2 or higher.

  • Create a project.

  • Make sure that your app’s build file uses the following values:

    • A minSdkVersion of 21 or higher.

    • A compileSdkVersion of 33 or higher.

Step Summary

  1. Configure you gradle build scripts

  2. Add the app permissions to the manifest

  3. Add the google app id to the manifest

  4. Continue with Implementation type

1. Gradle Configuration

Project Level settings.gradle file :

...

Code Block
languagegroovy
dependencies {
  implementation ("com.refinery89.androidsdk:sharedCore-android:X.Y.Z")
}

2. 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>

3. 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.

...

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 End Result

Note

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

...

Note

Only read the following step if your technical account manager didn’t already provide an Implementation type to follow, otherwise continue there.

4. Choose Implementation type

Single Tag Implementation

This is what you are looking for? continue here → https://refinery89.atlassian.net/wiki/x/BIDQSQ

...

  • You App is native and you are able to add tags to your views

  • Wants to Disable and enable Inventory slots without updating the application.

  • Wants tos Edit the ad units remotely over the web without updating the application.

  • Wants to Change Formats, slot place, sizes, etc.

Manual Implementation

This is what you are looking for? continue here → https://refinery89.atlassian.net/wiki/x/BgDOSQ

Info

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.

You can see an example in Demo Applications

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.

...

  • 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

Webview Implementation

This is what you are looking for? continue here → https://refinery89.atlassian.net/wiki/x/AgDlSQ

...

Note

Remember that you should be using our CMP also in web so consent data can be understood.

Note

If you are placing the all or some ads natively, meaning that the actions on the web view trigger native code through some kind of javascript interface, then we recommend using Manual Implementation or if you are displaying some ads inside the webview and others in the native app you can use this implementation type and manual together.

Comparison table

Feature

Manual

Single Tag

WebView

Integrated CMP.

Custom auctions in R89 Servers.

All Formats supported.

(error)

Remote Unit Configs.

Remote Ad Places.

(error)

(error)

Local Testing without R89 DB or Servers.

(error)

...