Fixes some coding and configuration errors preventing ads on Android being displayed.
Haxe Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

NMEX Android ads fix

Use NMEX to incorporate ads into your NME applications.

  1. Copy the nmex folder and the java folder to your src folder.

  2. Copy the AndroidManifest.xml,, Android folder and application.nmml to your root project directory

  3. Go to your Motion-Twin\haxe\lib\ nme\3,4,4\ templates\default\ android\ template\src\org\haxe\ nme folder and open the Change the class to public. Then, open the and change the member variable mView to public and static GameActivity activity to public static GameActivity activity.

  4. Go to your C:\Motion-Twin\haxe\lib\ nme\3,4,4\ templates\default\ android\ template folder and open the build.xml file. Change the target value to android-13. You will need to ensure you have downloaded the Android 3.3 (android 13) SDK with the SDK manager.

  5. Create an Admob account. Click add new app/site and enter the details requested. Afterwards, click on manage and then you will see your publisherID.

  6. Call AD.showAd() and pass in your publisherID

  7. Find your device ID by running logcat and examinine the output. This can be done by opening a command prompt, changing directory to your AndroidSDK platform tools and running adb logcat > logcat.txt. Then run your app. After it has finished starting, close the command prompt and open the generated logcat.txt file. Search it for your device ID. Then, open the file in the com\pixelpounce\ads folder. Replace the AdRequest.TEST_EMULATOR with your device id. Finally uncomment the adView.loadAd(request)