Follow

How to Set Up AdMob as an Ad Source

Requirements:

  • AerServ SDK (iOS | Android)
  • AdMob Ad Unit ID (to enter in AerServ UI)
  • Android requires updating the Android Manifest and gradle.build file

 

Ad Source Details:

 

 

  

How to Set Up the AdMob Ad Source


 

Step 1:  Create your account for AdMob

Step 2:   Log on to http://platform.aerserv.com/ and click on the Ad Sources link at the top of the page

Step 3:   Click the + or the Add New Ad Source button on the page (assuming that this ad-line is active on AdMob side, create an ad source on AerServ with the Ad Unit ID given from AdMob e.g. '012345ca-6789-1234-1234-123456789123')

Step 4:   Enter a Name for the ad source (example: AdMob Interstitial)

Step 5:   Select AdMob as the ad source

Step 6:   Enter the following fields that are specific to the AdMob ad source:

 

FIELD DESCRIPTION REQUIRED/OPTIONAL EXAMPLE
AdMob ID The Ad Unit ID assigned by AdMob Required app185a7e71e1714831a49ec7

 

 

 

 

Android


 

icon_android-on.png
AerServ SDK
download-sdk.png

 

Step 1.  In the build.gradle for your app, add the Play-Services-Ads library under dependencies. (Note: There are two build.gradle inside your project, a project build.gradle and a app build.gradle. You will want to add the following line inside your app build.gradle.) 

 
compile 'com.google.android.gms:play-services-ads:10.2.1'
 
If you are using Android Studio and don't have the following version of play-services, the SDK Manager will prompt you to download the version. 

Step 2.   Add the following activity to your AndroidManifest.xml

<activity 
  android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>

iOS 


 

image.jpg
AerServ SDK
download-sdk.png

 

Step 1.   Add the AdMob SDK in the folder network-support/AdMob/GoogleMobileAds.framework into your project frameworks.

 

Open Target > General > Under Deployment Info and for Device Orientation, check Portrait, Upside Down, Landscape Left, and Landscape Right

Open Target > Build Settings > Under Architectures, confirm that your Xcode project uses Base SDK version 9.0 or greater and that it does not use the armv6 architecture

Open Target > Build Settings > Under Linking, add -fobjc-arc to Other Linker Flags

 

Add the following libraries and frameworks to Target > Build Phases > Link Binary With Libraries:

AdSupport.framework (Set to Optional)
AudioToolbox.framework
AVFoundation.framework
CoreGraphics.framework
CoreMedia.framework
CoreMotion.framework CoreTelephony.framework
CoreVideo.framework EventKit.framework
EventKitUI.framework
GoogleMobilesAds.framework
GLKit.framework JavaScriptCore.framework (Set to Optional) MediaPlayer.framework
MessageUI.framework
OpenGLES.framework SafariServices.framework (Set to Optional) StoreKit.framework SystemConfiguration.framework
 

Step 2.   Add the following entry into your info.plist: 


<key>
NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoadsForMedia</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>
 
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments