This tutorial will show you how to quadruple your income from free apps in 10 minutes! Leadbolt ads have made me about 3 times as much as my Admob ads. I am currently getting between $4-8 per day with Admob and $15-20 per day with Leadbolt, and I could be making more if I increased the amount of ads I am showing. The only type of ad I show right now is a notification ad. If I showed icon ads, people say I could be making double what I am now! I may try it in the future and let you know how it goes.
1. Before you write any code, you must go to http://leadbolt.com/developers_signup.php?ref=10030964 in order to create an account and sign up. It’s very quick, only takes a few seconds.
2. Then download the sdk here: https://www.leadboltnetwork.net/publisher/help/index/cid:8
3. Add the sdk to your project. To do this, right click on the name of your project and create a new folder called “libs”. Copy and paste the sdk you downloaded into the libs folder you just created. Then right click on it and go to Build Path-> Add to Build Path.
4. First, I will show you how to add notification ads to your app. You need to create a notification ad on your Leadbolt dashboard (on the website) and enter in all of your app details. Then get the section ID number, because you will need it for the code you will be writing.
5. Next, edit your manifest file. You must add the next two lines of code before the “<application” tag:
1
2
| <uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> |
6. You must also enter the next line of code after the “<application” tag but before the “/application>” tag, replacing <Package Name> with your package name (com.blah.blah):
1
2
3
4
5
6
| <receiver android:name="com.Leadbolt.AdNotification"/>
<receiver android:name="<Package Name>.BootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver> |
7. Now put this code in your onCreate method, replacing MY_LEADBOLT_SECTION_ID with the section ID number you got when you created your app on the Leadbolt dashboard:
1
2
3
| AdController myController = new AdController(getApplicationContext(),"MY_LEADBOLT_SECTION_ID");
myController.setAsynchTask(true);
myController.loadNotification(); |
8. Create a new class called BootReceiver.java and place the following code inside of it, once again making sure that your replace YOUR_LB_SECTION_ID with your ID:
1
2
3
4
5
6
7
8
9
10
11
| import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import com.Leadbolt.AdController;
public class BootReceiver extends BroadcastReceiver {
public void onReceive(Context arg0, Intent arg1) {
//register the notification on reboot
AdController mycontroller = new AdController(arg0, "YOUR_LB_SECTION_ID");
mycontroller.loadNotification();
}
} |
9. Your Notification Ad should now be ready to go. You don’t need to do anything else, but if you would like to add Icon Ads, keep reading.
10. Just like you created your notification ad on the Leadbolt dashboard, you now need to create an Icon Ad for the same app. This will give you a different section ID that you will need to use for this section.
11. Next you need to edit your manifest file. Always make adding the necessary permissions to your manifest file the first thing you do, because you WILL forget one day and you will be debugging trying to find errors for hours when finally you will realize that you forgot to add it to your manifest. This still happens to me many times and it is very frustrating. Anyway, place this next to your other uses-permissions:
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
12. Add these lines in your onCreate method, replacing the section ID and your Icon Ad will be ready to go:
1
2
3
| AdController myControllerIcon = new AdController(getApplicationContext(),"MY_LEADBOLT_SECTION_ID");
myControllerIcon.setAsynchTask(true);
myControllerIcon.loadIcon(); |
13. You can also add many other types of ads, including banner ads, an app wall and content unlockers, but I have found that Admob gives better results for banners, and I haven’t tried the app wall, but AppBrain has been doing well for me, so I would stick to using AppBrain for an app wall. I will do this tutorial soon. The content unlockers apparently yield good amounts of money, but for me they are too annoying to the user. You are more than welcome to give them a try and let me know how they are. Go to http://leadbolt.com/developers_signup.php?ref=10030964 to sign up now and quadruple your income for apps!