Difference between revisions of "Admob Android Wrapper"

From POKKT DOCUMENTATION
Jump to: navigation, search
(Step 4: Adding a Custom Event)
(Pokkt Integration to AdMob)
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Pokkt Integration to AdMob ==
 
== Pokkt Integration to AdMob ==
  
<small>Last Update: 5th February, 2020</small>
+
<small>Last Update: 2nd June, 2020</small>
  
 
-----
 
-----
Line 11: Line 11:
 
AdMob consent library used: 1.0.7
 
AdMob consent library used: 1.0.7
  
Download Latest Version [[Admob_Wrapper_Download| AdMob Wrapper]].
+
Download Latest Version [[Native_SDK_Download| AdMob Wrapper]].
  
 
-----
 
-----
Line 25: Line 25:
 
* Create Account and log-in at [https://www.pokkt.com https://www.pokkt.com]
 
* Create Account and log-in at [https://www.pokkt.com https://www.pokkt.com]
 
* Add your application and get its application Id and Security key.
 
* Add your application and get its application Id and Security key.
 +
  
 
-----
 
-----
Line 53: Line 54:
 
<li>android.permission.INTERNET = Required for SDK communication with server.</li>
 
<li>android.permission.INTERNET = Required for SDK communication with server.</li>
 
<li>android.permission.ACCESS_NETWORK_STATE = Required to detect changes in network, like if WIFI is available or not.</li></ul>
 
<li>android.permission.ACCESS_NETWORK_STATE = Required to detect changes in network, like if WIFI is available or not.</li></ul>
</li>
+
</ol>
  
 
'''Activity Declaration'''
 
'''Activity Declaration'''
Line 67: Line 68:
 
   android:windowSoftInputMode="stateAlwaysHidden|adjustUnspecified" /></pre>
 
   android:windowSoftInputMode="stateAlwaysHidden|adjustUnspecified" /></pre>
 
You can change the android screenOrientation landscape to portrait of your choice, the way you want to display the ads.
 
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.
  
 
-----
 
-----
Line 77: Line 82:
 
<li>Click Mediation on the left navigation menu item.</li>
 
<li>Click Mediation on the left navigation menu item.</li>
 
<li>Select the mediation group to which POKKT should be added.<br /><br> [[Image:admob_andr_mediation.jpg|800px]]<br /><br></li>
 
<li>Select the mediation group to which POKKT should be added.<br /><br> [[Image:admob_andr_mediation.jpg|800px]]<br /><br></li>
<li> Click Custom event under AdSources, and provide the following details:<ul> '''Label''': Enter the name for the custom event. This is used in reporting and cannot be changed later. </li></ul><br><br /> [[Image:admob_andr_adunit.jpg|800px]]<br /><br></li>
+
<li> Click Custom event under AdSources, and provide the following details:<ul><li> '''Label''': Enter the name for the custom event. This is used in reporting and cannot be changed later. </li></ul><br /> [[Image:admob_andr_adunit.jpg|800px]]<br /><br></li>
 
<li> Click Continue and Add class name and Parameters.
 
<li> Click Continue and Add class name and Parameters.
 
<ul>
 
<ul>
Line 85: Line 90:
 
<li> For Interstitial: com.pokkt.wrapper.thirdparty.AdMob.PokktCustomEventInterstitial</li>
 
<li> For Interstitial: com.pokkt.wrapper.thirdparty.AdMob.PokktCustomEventInterstitial</li>
 
<li> For Banner: com.pokkt.wrapper.thirdparty.AdMob.PokktCustomEventBanner</li>
 
<li> For Banner: com.pokkt.wrapper.thirdparty.AdMob.PokktCustomEventBanner</li>
<li> For Native : com.pokkt.wrapper.thirdparty.AdMob.PokktCustomNative'</li></ul>
+
<li> For Native : com.pokkt.wrapper.thirdparty.AdMob.PokktCustomNative'</li> </ul>
[[Image:ace_1.jpg|800px]]<br /><br>
 
  
<p>If you are using our Wrapper jar, Custom event class name will be:</p>
+
[[Image:Ace_1.jpeg |800px]]
<ul>
 
<li>For Rewarded Video: '''com.pokkt.wrapper.thirdparty.AdMob.PokktCustomRewardedVideo'''</li>
 
<li>For Interstitial: '''com.pokkt.wrapper.thirdparty.AdMob.PokktCustomInterstitial'''</li>
 
<li>For Banner: '''com.pokkt.wrapper.thirdparty.AdMob.PokktCustomBanner'''</li>
 
</ul>
 
</li>
 
<li>'''Label:'''Enter the name for the custom event. This is used in reporting and cannot be changed later.</li>
 
 
<li><p>'''Parameter(Mandatory):'''Enter a JSON string as follows:</p>
 
<li><p>'''Parameter(Mandatory):'''Enter a JSON string as follows:</p>
 
<pre>{
 
<pre>{
"POKKT_SCREEN_NAME":"Screen Created on Pokkt Dashboard",
+
"SCREEN ": "Screen ID Created on Pokkt Dashboard ",
"POKKT_APP_ID":"Pokkt App Id",
+
"APPID ": "Pokkt App Id ",
"POKKT_SEC_KEY":"Pokkt App Security Key",
+
"SECKEY ": "Pokkt App Security Key ",
"POKKT_THIRD_PARTY_USERID":"Unique user id as in your app",
+
"TPID ": "Unique user id(If exist) as in your app ",
"POKKT_REWARD_NAME":"Virtual currency As per your App",
+
"RWD ": "Virtual currency As per your App ",
"POKKT_DEBUG":true/false
+
"DBG ": true / false,
}</pre>
+
"GDPR ": true / false
</li></ul>
+
} </pre>
 +
</li></ul></ol>
  
[[Image:admob_andr_configure.jpg|800px]]<br /><br></li>
 
<li>Click Done.</li></ol>
 
  
 
-----
 
-----

Latest revision as of 15:30, 2 June 2020

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

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

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

  1. Sign in to your AdMob account at https://apps.admob.com.
  2. Under All apps on the left navigation, select the app you want to update.
  3. Click Mediation on the left navigation menu item.
  4. Select the mediation group to which POKKT should be added.

    Admob andr mediation.jpg

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

    Admob andr adunit.jpg

  6. 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'

      Ace 1.jpeg

    • 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
      } 



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.