NMEX Android ads fix
Use NMEX to incorporate ads into your NME applications.
Copy the nmex folder and the java folder to your src folder.
application.nmmlto your root project directory
Go to your
Motion-Twin\haxe\lib\ nme\3,4,4\ templates\default\ android\ template\src\org\haxe\ nmefolder and open the
MainView.java. Change the class to public. Then, open the
GameActivity.javaand change the member variable
mViewto public and
static GameActivity activityto
public static GameActivity activity.
Go to your
C:\Motion-Twin\haxe\lib\ nme\3,4,4\ templates\default\ android\ templatefolder and open the
build.xmlfile. 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.
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.
AD.showAd()and pass in your publisherID
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
AdActivity.javafile in the com\pixelpounce\ads folder. Replace the
AdRequest.TEST_EMULATORwith your device id. Finally uncomment the