Android application display banner ads in the relative position

The preparation for coding

Before reading this tutorial, please read the getting startted with android ads to learn how to get library, how to install AD library, how to add configuration information

Add advertising related Java code

1. import keymob related classes
    import com.keymob.networks.AdManager;
    import com.keymob.networks.core.*;
import com.keymob.sdk.core.AdTypes;
2.Initialization Keymob
Initialization Keymob library management is the prerequisite to call other advertising functions , the following is to init with the Keymob.com service
AdManager.getInstance().initFromKeymobService(this, "1", new AdEventListener(), false);
3.Display ads
Show banner ads in the relative position location at the center bottom of the app
AdManager.getInstance().showRelationBanner(BannerSizes.BANNER, BannerPositions.BOTTOM_CENTER,0);

Configuration changes

After writing the code, in accordance with the previous tutorial, add permissions configuration and Activity configuration information

More tutorial of add ad in app   qq group 310513042   home