I'm thinking of integrating Leadbolt (or Tapjoy) to my Libgdx game. I want to make a store based on the clicked forms. More click - more stuff from the store for the user. I found Leadbolt and Tapjoy. These ad providers are providing direct helps for these stuffs. I have take a look on the Leadbolt integrating guide. I have a problem with it. It needs me to pass a context to the AdController. I don't know if it possible in any way to pass the context for the AdController or not, so I would like to ask you about it, that how can I do, if I can. (I haven't tried it in Libgdx yet, but with the superjumper example had problem too, when I wanted to pass a context for something, and I think because the Libgdx app don't extends an Activity, it will have problems too.)
Here is the sample code from Leadbolt:
AdController myControllerForm = new AdController(this, "MY_LB_ID", new AdListener() {
public void onAdProgress() {}
public void onAdLoaded() {
myControllerForm.hideAd();
}
public void onAdFailed() {
launchMain();
}
public void onAdCompleted() {
myControllerForm.hideAd();
launchMain();
}
public void onAdClosed() {
launchMain();
}
public void onAdClicked() {}
public void onAdAlreadyCompleted() {
launchMain();
}
public void onAdHidden() {
launchMain();
}
});
myControllerForm.setAsynchTask(true);
myControllerForm.loadAd();
}
public void launchMain()
{
finish();
startActivity(new Intent(Splash.this, MainApp.class));
}
}
The class extends Activity, and the methods are in the onCreate() method in this example.
If you have integrated the Leadbolt or Tapjoy to your Libgdx game, then could you please give me a code about how did you do it?
Thanks in advance!