HOW TO ADD MOPUB BANNER

There are still many people who do not know how to insert ads into their android project. therefore I will make this post to facilitate you in understanding how to insert advertisements. ads that will be used as a tutorial material is MoPub. There have been many people who have registered on their site but get stuck for several reasons, first do not know how to integrate ads into Android applications, second because of the approval of mopub.


I myself have so many accounts was approved but only slightly. not much of a problem, we will begin the tutorial how to add ads mopub to android application.should you need is the software maker or AndroidStudio Eclipse android application. However, the software that I did not use because I already fell in love with AIDE, android app maker of your own android phone.once you have one of the above software and works well, for the first step we need a simple project like "Hello World" we will edit.

In the hello world project stretcher are some folders and files, now we add or we will edit is initiated from:
1. Add the folder "libs" to save the SDK MoPub, for this I guess you already know so proceed with the next stage.
2. Open the file AndroidManifest.xml
then add the code as shown below.



3. Just add the code in the image below without editing or deleting other codes. Write exactly the image that I put for the sake of eliminating the errors that will make you confused.
 
4. And finally add a few lines of code at the javanya, located in the SRC folder, remember to add exactly the image that I put.

 Above is a way to add the form of banner ads mopub into android application. Remember to replace UnitId at the code into your UnitID. Compile and run in android emulator or your phone and see the ad.

A few ways to add mopub banner ads into android project, others wait. Thank you.


For the next post, we will discuss how to add multiple banners mopub in android project


Comments