Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

AdMob on Nokia X

From Wiki
Jump to: navigation, search
Featured Article
06 Apr
2014

This article explains the special case you need to consider when using AdMob in a Nokia X application, which has been ported to use HERE Maps with the HERE Maps reference library for Google Maps v2.

Article Metadata
Code ExampleTested with
SDK: Nokia X services SDK
Devices(s): Nokia X
Dependencies: HERE Maps API
Article
Created: Tomi_ (05 Apr 2014)
Last edited: apo143u (12 Apr 2014)

Contents

Introduction

Just like most Android ad frameworks, Google's AdMob, a cross-platform ad framework, is supported on Nokia X. However, there is a special case to consider: If you have ported a map enabled application, from Google Maps v2 to HERE Maps, using the HERE reference library for Google Maps v2, you cannot use the library with the identical namespace. Instead, you have to utilise the alternative reference library available in GitHub.

Nokia X considerations

Because the latest version of Google's AdMob framework is included in Google Play Services, using the HERE reference library, with the Google namespace, in the same application will not work. The reason for this is simple: the namespaces will collide resulting in compiler errors. Fortunately, Nokia has provided alternative HERE reference library intended to use in the One APK approarch and this library version will also work together with AdMob.

You can also find Maps v2 One APK sample app in special branch of a GitHub project, which demonstrates the integration of AdMob and HERE Maps reference library. If you want to download the source code as a ZIP file, here's the link for that: https://github.com/nokia-developer/nokia-x-here-maps-samples/archive/ads_release.zip

One nice feature of using the alternative HERE reference library is that you are one step closer to creating a sustainable code base, which you can use to build a single APK, that will work both in Nokia X and in Google enabled Android devices. The sample app also demonstrates both the use of banner ads and interstitial ads. Below are screenshots from Nokia X and a Google Android device device compared side by side:

Summary

In most cases utilising an Android ad framework will work on Nokia X software platform without any special considerations. However, when AdMob is used together with HERE Maps reference library for Google Maps v2, you need to make sure that you use an alternative HERE reference library, which has a Nokia specific namespace to avoid the collision of namespaces with Google Play Services.

Version Hint

Windows Phone: [[Category:Windows Phone]]
[[Category:Windows Phone 7.5]]
[[Category:Windows Phone 8]]

Nokia Asha: [[Category:Nokia Asha]]
[[Category:Nokia Asha Platform 1.0]]

Series 40: [[Category:Series 40]]
[[Category:Series 40 1st Edition]] [[Category:Series 40 2nd Edition]]
[[Category:Series 40 3rd Edition (initial release)]] [[Category:Series 40 3rd Edition FP1]] [[Category:Series 40 3rd Edition FP2]]
[[Category:Series 40 5th Edition (initial release)]] [[Category:Series 40 5th Edition FP1]]
[[Category:Series 40 6th Edition (initial release)]] [[Category:Series 40 6th Edition FP1]] [[Category:Series 40 Developer Platform 1.0]] [[Category:Series 40 Developer Platform 1.1]] [[Category:Series 40 Developer Platform 2.0]]

Symbian: [[Category:Symbian]]
[[Category:S60 1st Edition]] [[Category:S60 2nd Edition (initial release)]] [[Category:S60 2nd Edition FP1]] [[Category:S60 2nd Edition FP2]] [[Category:S60 2nd Edition FP3]]
[[Category:S60 3rd Edition (initial release)]] [[Category:S60 3rd Edition FP1]] [[Category:S60 3rd Edition FP2]]
[[Category:S60 5th Edition]]
[[Category:Symbian^3]] [[Category:Symbian Anna]] [[Category:Nokia Belle]]

This page was last modified on 12 April 2014, at 06:58.
282 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×