I have an Android Project where I need to build multiple versions of the same application from the same sources.
To do this, I use the android plugin for Maven
Each version must be able to include ads from admob. So in my POM I added this dependancy
<dependency>
<groupId>com.admob.android</groupId>
<artifactId>ads</artifactId>
<version>20101109-ANDROID-3312276cc1406347</version>
<scope>system</scope>
<systemPath>THE_PATH\libs\admob-sdk-android.jar</systemPath>
</dependency>
I don't get any errors at build time but, when I execute the application I get this exception
java.lang.ClassNotFoundException: com.admob.android.ads.AdView
So apparently the package is not properly included ?
CPM is around $1, or $1 per 1000 Ad impressions. Clicks I have seen as high as $0.25, but its going to vary on the Ad shown obviously.
The advertising ID works like cookies in a web browser, is only meant for advertising purposes and enables users to reset or opt out of targeted ads within apps. In admob, the advertising ID is available via the google play services library and not the deprecated GoogleAdmobADSSdk-6. X.X.
Show the ad Interstitial ads should be displayed during natural pauses in the flow of an app. Between levels of a game is a good example, or after the user completes a task. To show an interstitial, use the show() method. Log.
You can NOT use system scope for runtime required libraries. Deploy the jar into your local repository or your repository server (using e.g. mvn install:installFile ..) and remove scope and systemPath from the dependency declaration.
Update: As of the latest releases my Maven Android SDK Deployer can do the install of the AdMob jar from the SDK into your local Maven repository or repository server for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With