I'm trying to implement ChartBoost plugin for Android. The plugin should be accessible via Lua code.
Afaik, the initialization of ChartBoost must be called inside onCreate method. The plugin went error when I initialize it outside onCreate method. The problem is I can't set appId and appSignature via Lua code if ChartBoost must be initialized on onCreate.
When did the plugin's onCreate method called?
Is plugin's Java class instantiated/executed automaticaly when the player started?
fyi, I following
@ar2rsawseen's tutorial and using the pattern of GoogleBilling plugin.
Comments
At the onCreate function of Activity.
There are two points here:
1. Your onCreate function should be static like:
https://github.com/ar2rsawseen/GiderosFlurryAndroid/blob/master/StandAlonePlugin/src/com/giderosmobile/android/Flurry.java
the following code need to be called inside onCreate method
Can't create handler inside thread that has not called Looper.prepare()
Hmm.. I guess I need to learn about Looper.prepare()
thanks :-bd
Likes: ar2rsawseen
Can I catch key event on my plugin?
I tried:
The easy way would be to add event listener in Lua, that will call somekind of method from your plugin (which calls C funciton, which calls Java function).
But if you want to automatically register to event, without the need for user to do it in Lua by himself, then you need to do it from C (by getting stage object, then by getting it's addevntlistener method, then by calling it, etc).
Actually I don't know why, but all this C to Lua bridge (same for Java), seems such a pain. So many things can go wrong and needs to be considered. Not as easy as it is advertised
for example we could look at Corona Enterprise docs http://docs.coronalabs.com/native/enterprise/ios/index.html
http://www.nightspade.com
There are couple of interesting ideas there
https://github.com/zaniar/gideros_chartboost
Likes: Nascode, mysps, deniz, fxone
I do as the guide said, except 2 things:
1.Bind back button instead of menu button.
2.Keep the following line:
Config like above, the game works fine however there's no fullscreen ads show as expected
p/s: my Integration Status show green SDK and Analytics show Boot ups = 4..Does this mean my game does have request but in that moment Chartboost has no ads to serve?
Ultimate Games on Appstore
Ultimate Games on Google Play
https://play.google.com/store/apps/developer?id=My+name+is+Originality
My Revmob account usually say:
[RevMob] reason: No ads for this device/country right now, or your App ID is paused.
For my problem, after integrating Chartboost SDK, I created a new Chartboost publish campaign and now I can see ads. However I still don't know how to control it appearance, I attach ads in back button press event but my game show ads when playing
Ultimate Games on Appstore
Ultimate Games on Google Play
https://play.google.com/store/apps/developer?id=My+name+is+Originality
Likes: fxone
Ultimate Games on Appstore
Ultimate Games on Google Play
My game show chartboost ads at end game. I published last night and there is around 10 impression, 1 crash.
java.lang.NullPointerException
at com.nightspade.gideros.android.plugins.chartboost.GChartBoost.onKeyUp(GChartBoost.java:59)
at com.giderosmobile.android.CupidGameofLoveActivity.onKeyUp(CupidGameofLoveActivity.java:201)
at android.view.KeyEvent.dispatch(KeyEvent.java:1294)
at android.app.Activity.dispatchKeyEvent(Activity.java:2078)
at
Ultimate Games on Appstore
Ultimate Games on Google Play
Likes: thanhquan1512
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
chartboost:hasCachedInterstitial()
before
chartboost:showInterstitial()
Thank you
Ultimate Games on Appstore
Ultimate Games on Google Play
I try to using chartboost from https://github.com/zaniar/gideros_chartboost
But when run debug on android device it forces close with error:
Here is my project in Gideros an Eclipse.
https://www.dropbox.com/s/ppdc0xt6yl1u531/TestPlugin.zip
https://www.dropbox.com/s/i6zch5dggxfclfb/TestPlugin_Android.zip
Can you take a look and help me?
https://play.google.com/store/apps/developer?id=My+name+is+Originality
https://play.google.com/store/apps/developer?id=My+name+is+Originality
https://play.google.com/store/apps/developer?id=My+name+is+Originality
Oop, I think plugin just need .so , java and .jar file.
I still get error after adding Android.mk and other file. Would you give me some advice please?
https://www.dropbox.com/s/i6zch5dggxfclfb/TestPlugin_Android.zip
When run ndk-build I have below error:
https://play.google.com/store/apps/developer?id=My+name+is+Originality