MULTI BANNER SMAATO (NEW SMAATO)

Previously I've posted a tutorial how to install single banner airpush, mopub single banner, banner smaato single, multi-banner airpush and multi-banner mopub on android project, now I will modify the post that originally gave rise only 1 ad banner so that now you can bring up an ad banner airpush more than 1 or in other words the Multi banner.

Multi Banner is a collection of some banner ads are arranged in neat, systematic and does not result in an error in your android app. This I have proved, airpush banner ads bring more than one, but sometimes it does not appear appropriate advertising airpush our expectations and if the ads that you want to spend so much, sometimes the ads that came out just a plain white color but it also counts as advertising because when the click you will be taken to address ad is clicked.


I mentioned in my previous post about multi-banner airpush and multi-banner mopub, that to add multiple banners on android project, system and do the same just different code entered.

To minimize the time, let's edit the returned results of a previous study using banner smaato single, there is no code that we will change but just add a few lines of code only. The code will be added here are the main.xml file while the other files or AndroidManifest.xml and MainActivity.java no additions. For further explanation, let's start the tutorial.

1. Prepare the project back before we make on how to add a banner smaato as reference material to continue the project.

2. Single Banner Smaato tutorial, sample code on main.xml is as follows.
To create android project with multi-banner, it would require the addition of a few lines of code. The code is as follows.

Put the above code just below code Banner Smaato previous singles.
If you look at the code above, the android en each only given numbers behind the order id is different each using RelativeLayout so they are not overlapping.
For the first code, given the additional code that is "alignParentTop" which means that it is dipaling code above. While the second code is not given the code but the code "@ + id = layout_below / enter the name id using alignParentTop".
If you are using alignParentTop on both the code above, then who looks just 1 ad because other ads stacked.
3. File MainActivity.java also given the changes that are very easy to know and dipelajar. From the previous file, we know that at this java file written as below.
Whereas if you want to avoid an error when adding multiple banners in main.xml code, it is necessary to add a few lines of code in .java is as follows.

Save and Compile your project, to test ads, use the emulator or your phone.
Thank you for visiting and attention, may be useful and wait for my next tutorial.
Next we will learn about the startApp Single Banner SDK version 2.4.1. 
   

Comments

  1. If you are looking for an excellent contextual advertising company, I recommend that you check out Clicksor.

    ReplyDelete

Post a Comment