Tag Archives: CodenameOne

Adding ads in CodenameOne

Adding apps to a codename one project is surprisingly simple, though the current documentation lacks enough information about this to easily implement it without using the GUI builder. The first step you’ll want to undertake is create an account on “inner-active.com”. Once your account has been approved, you can create an ad following the instructions on their wiki.
After this has been completed, you only need three lines of code to add the ad to your application

	Ads ads = new Ads();
	ads.setAppID("YOUR-APP-ID-HERE");
	this.addComponent(BorderLayout.NORTH,ads);