Difference between revisions of "Admob Android Wrapper"
(→Pokkt Integration to AdMob) |
(→Pokkt Integration to AdMob) |
||
Line 11: | Line 11: | ||
AdMob consent library used: 1.0.7 | AdMob consent library used: 1.0.7 | ||
− | Download Latest Version [[Native_SDK_Download | + | Download Latest Version [[Native_SDK_Download| AdMob Wrapper]]. |
----- | ----- |
Revision as of 15:30, 2 June 2020
Contents
Pokkt Integration to AdMob
Last Update: 2nd June, 2020
Pokkt SDK version required: 8.0.0
AdMob SDK version used: 18.3.0
AdMob consent library used: 1.0.7
Download Latest Version AdMob Wrapper.
Step 1: Getting Started
The following instructions assume you have already integrated Google Mobile Ads SDK into your application.
Step 2: Adding Your Application to Your Pokkt Publisher's Account
- Create Account and log-in at https://www.pokkt.com
- Add your application and get its application Id and Security key.
Step 3: Pokkt Integration
GDPR
- Pokkt Solution adheres to GDPR requirement as per AdMob doc. Please refer section “Publisher-managed consent collection” at https://developers.google.com/admob/android/eu-consent and https://developers.google.com/admob/android/euconsent#forward_consent_to_the_google_mobile_ads_sdk for understanding.
- GDPR consent must be taken by publishers before calling any ad related api. For more information on GDPR please refer https://www.eugdpr.org/ and https://www.eugdpr.org/gdpr-faqs.html.
Dependencies
- Add PokktSDK_v8.0.0.aar or PokktSDK_v8.0.0.jar to your project.
- Add AdMob consent library to your project.
Manifest
Permissions Declarations
Add the following permissions to your project manifest
Mandatory permissions.
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
- android.permission.INTERNET = Required for SDK communication with server.
- android.permission.ACCESS_NETWORK_STATE = Required to detect changes in network, like if WIFI is available or not.
Activity Declaration
Add the following activity in your AndroidManifest for Pokkt SDK integration.
<activity android:name="com.pokkt.sdk.PokktAdActivity" android:configChanges="keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode||screenSize|smallestScreenSize" android:hardwareAccelerated="true" android:label="Pokkt" android:screenOrientation="landscape" android:windowSoftInputMode="stateAlwaysHidden|adjustUnspecified" />
You can change the android screenOrientation landscape to portrait of your choice, the way you want to display the ads.
Unity
- Add PoktSDK to your project’s Assets->Plugins->Android folder.
- PokktSDK Unity Plugin is not needed for AdMob Mediation.
Step 4: Adding a Custom Event
- Sign in to your AdMob account at https://apps.admob.com.
- Under All apps on the left navigation, select the app you want to update.
- Click Mediation on the left navigation menu item.
- Select the mediation group to which POKKT should be added.
- Click Custom event under AdSources, and provide the following details:
- Label: Enter the name for the custom event. This is used in reporting and cannot be changed later.
- Click Continue and Add class name and Parameters.
- Class Name: Enter the name of the custom event class.
- For Rewarded Video: com.pokkt.wrapper.thirdparty.AdMob.PokktRewardedVideoAdapter
- For Interstitial: com.pokkt.wrapper.thirdparty.AdMob.PokktCustomEventInterstitial
- For Banner: com.pokkt.wrapper.thirdparty.AdMob.PokktCustomEventBanner
- For Native : com.pokkt.wrapper.thirdparty.AdMob.PokktCustomNative'
Parameter(Mandatory):Enter a JSON string as follows:
{ "SCREEN ": "Screen ID Created on Pokkt Dashboard ", "APPID ": "Pokkt App Id ", "SECKEY ": "Pokkt App Security Key ", "TPID ": "Unique user id(If exist) as in your app ", "RWD ": "Virtual currency As per your App ", "DBG ": true / false, "GDPR ": true / false }
- Class Name: Enter the name of the custom event class.
Step 5: Testing your application
Congratulation - that's it! You may now run your app and see Pokkt ads in action.
Note - It will take around 6 hours time to reflect the changes made in the AdMob dashboard.