Chartboost Plugin released!

Can I use the plugin with Amazon?

Yes. We have also updated our store entry and Chartboost docs to reflect this.

Thanks

I need some help, beacuse using my Android device I get a “failed” result every time I try to show something.

Using the sample code from GitHub, I get a valid login.

status: valid

type: check

name: license

But when I try to show an ad:

phase:load

type: interstitial

name: chartboost

result:failed

It doesn’t matter if I set to true testMode or not, I only get a failed response.

Anyone knows what could be going on?  :unsure:

I do.

As said before, it is extremely important to have your Chartboost dashboard configured correctly.

In a nutshell, you need to follow these steps:

  1. Create android version of your app from the Chartboost dashboard and add your app id/signature to your code that you pass to chartboost.init. Both platforms (android/ios) use different app id/signatures.

So you should do something like this:

-- Your ChartBoost app id local yourAppID = "your\_app\_id\_here\_for\_ios"; -- Your ChartBoost app signature local yourAppSignature = "your\_app\_sig\_here\_for\_ios"; -- Change the appid/sig for android (required by Chartboost) if system.getInfo( "platformName" ) == "Android" then     yourAppID = "your\_app\_id\_here\_for\_android";     yourAppSignature = "your\_app\_sig\_here\_for\_android"; end
  1. Add a test device (Android in this case) to your test devices section in the Chartboost dashboard.

  2. Create a publishing campaign.

  3. Add the test device (that you previously added in step 2) to a device list (via csv file) here: https://dashboard.chartboost.com/companies/device-lists

  4. Add the device list to the campaigns “inclusion” section near the bottom of the campaign form.

  5. You should now see consistent ads, provided everything was done correctly.

These instructions apply to iOS and Android. Completing them all for both platforms ensures that you will get the best possible testing experience.

Cheers

Yeah Gremlin that was it, I had the app added to my dashboard, BUT I didn’t created a campaign for it.  :wacko:

It is not complicated, but it is easy to overlook a step and consequently lose some time trying to get it fixed. :frowning:

My feedback for you is that you should copy&paste your previous post inside the plugin documentation for newbies like me. Or simply just copy&paste the short version; the one yourself wrote here on a previous page of this thread:

  1. Please make sure you have added your iOS device to the Chartboost portal, otherwise ads may not show: https://dashboard.chartboost.com/companies/test-devices

 

  1. Please make sure you have set up a publishing campaign for your app, or ads may not show. https://dashboard.chartboost.com/campaigns/publishing

 

Thank you for the awesome support, I couldn’t be happier of my purchase!  :lol:

No problem, glad to help :slight_smile:

I agree that this would save me time to add this to the docs, I just haven’t found the time to do that yet…

it’s on my todo list however.

Cheers.

Just testing the new chartboost plugin on Android some things I noticed

chartboost.hasCachedInterstitial() returns a function not a bool and I still fail to load the interstitial if it’s not loaded  

also I noticed when the interstials were working (they stopped working a moment ago for some unknown reason when more apps started to work) When they animate out they have very sharp angles, coming almost straight out of the viewport and not looking as good as in the lua SDK or iOS version.

will test on iOS soon, I hope it’s not broken on there either 

We will look into that function issue. Have you followed all the steps i listed two posts back? That’s important.

We have no control over the display, that is just how they are provided to us. We will ask Chartboost if there is anything we can do to control the transitions however, but I wouldn’t think that they would expose that.

The iOS version is unchanged, bar the new didDisplay event and the new hasCached function additions.

We know of several people who have integrated the Android version fine during our beta testing phase, so please go over that post i mentioned and ensure you have done each and every one of the steps listed.

Cheers

I have implemented the iOS and Android versions, and they work just fine so far.

However I do not use the hasCached() functions as I use the callbacks to determine cache status myself.

As for the Android animations, there’s nothing they can do about that. Android doesn’t have any backwards compatible fancy UIImage 3D transform matrixes as iOS has. For me, the Android version looks similar to Chartboost’s own Lua SDK counterpart while animating in/out though. 

NOTE:

If you’re testing Chartboost for an Amazon app, make sure you have the Amazon App Store app installed on the device. I was getting unusual behavior on my Nexus 7 while testing, but after installing the Amazon app everything started to work as expected.

It’s disconcerting right now as I’m testing with live ads that have been working for over a month and I get odd results at times, especially with more apps not working anymore, but working in my last release.   I supposed I could switch to a testmode ID, and setup up test devices, but I not sure how to get a MacID or android Id for the test devices, are there any quick tools for this?

This is just how it is from my experience. Until you add your test devices and device lists etc. When you do that you get consistent test results.

On the android app store, look for an app called “adid”. That prints/emails your android id for you.

Just remember, adding test devices alone is not enough. You have to also add them to a device list and add that device list to your inclusion list in your campaign.

 this is

menu.lua

local chartboost = require( “plugin.chartboost” );

 

–The ChartBoost listener function

local function chartBoostListener( event )

for k, v in pairs( event ) do

print( k, “:”, v )

end

end

 

– Your ChartBoost app id

 

 

 

local yourAppID = “sfsfsfsfffffffffffffsf”;

– Your ChartBoost app signature

local yourAppSignature = “fsfsfsfsfsfsssssssssssssss”;

 

 

chartboost.init(

{

licenseKey = “ccccccccccccccccccccccc”,

testMode = false,

appID = yourAppID,

appSignature = yourAppSignature, 

listener = chartBoostListener ,

}

);

 chartboost.cache();

function scene:exitScene( event )

        local group = self.view

 chartboost.show( “interstitial” );

        –      INSERT code here (e.g. stop timers, remove listeners, unload sounds, etc.)

end

is this set up right?

I test without internet ,

When I move to another scene, it delays about 6 or more seconds.

***------------------**********************************************************************

I test with internet , it delays about 2 or more seconds.

Calling chartboost.cache() doesn’t guarantee that an ad will be cached.

You should test for this by adding chartboost.hasCachedInterstitial() before calling show().

if chartboost.hasCachedInterstitial() then chartboost.show("interstitial") end

so I have to put it

this is

menu.lua

local chartboost = require( “plugin.chartboost” );

 

–The ChartBoost listener function

local function chartBoostListener( event )

for k, v in pairs( event ) do

print( k, “:”, v )

end

end

 

– Your ChartBoost app id

 

 

 

local yourAppID = “sfsfsfsfffffffffffffsf”;

– Your ChartBoost app signature

local yourAppSignature = “fsfsfsfsfsfsssssssssssssss”;

 

 

chartboost.init(

{

licenseKey = “ccccccccccccccccccccccc”,

testMode = false,

appID = yourAppID,

appSignature = yourAppSignature, 

listener = chartBoostListener ,

}

);

 

 chartboost.cache();

 

 

 

 

 

function scene:exitScene( event )

        local group = self.view

if chartboost.hasCachedInterstitial() then                      ----------------------  So I have to place here…
chartboost.show(“interstitial”)
end

 

 

        –      INSERT code here (e.g. stop timers, remove listeners, unload sounds, etc.)

end

 

is this set up right?

I test without internet ,

When I move to another scene, it delays about 6 or more seconds.

 

***------------------**********************************************************************

I test with internet , it delays about 2 or more seconds.

I’m not sure why it takes a few seconds for the ad to show up. In my experience it shows up quickly.

I suspect since you do it in an exitScene that the app is busy loading the other scene before it has time to show the ad. I’d recommend changing your ad logic to show the ad before exiting the scene.

Also, ads will not work without Internet. I guess that if the ad is cached it might show up, however you will not be able to generate any revenue without an internet connection. I’d recommend checking for an Internet connection from time-to-time in your app and set a flag if a connection exists, and also only show an ad if the flag is true.

You can read this thread for some ideas:

http://forums.coronalabs.com/topic/33356-check-for-internet-connection/

I am getting the error 
 

bad argument #1 to 'startSession' (string expected, got no value)

whenever I call startSession in my app’s onResume… 
Do I have to pass any parameter to the function?

[quote=“Satheesh,post:156,topic:326148”]

I am getting the error

bad argument #1 to 'startSession' (string expected, got no value)

whenever I call startSession in my app’s onResume…
Do I have to pass any parameter to the function? [/quote]

We will check this out. Your using our Chartboost plugin right? Not the Lua one from Chartboost?

Thanks

Yeah yeah… I am using the plugin 

cb = require( "plugin.chartboost" )

Apparently the startSession function requires 2 arguments. 
When my app starts, I don’t call this function and the ads load perfectly. 
But during onResume,  when I call this function(as you’d mentioned above) this error occirs…

If I give 

cb.startSession(" "," ")

just for testing it,the errors are gone, but the ads do not load anymore. 
I always get “failed”

[quote=“Satheesh,post:158,topic:326148”]

Yeah yeah… I am using the plugin

cb = require( "plugin.chartboost" )

Apparently the startSession function requires 2 arguments.
When my app starts, I don’t call this function and the ads load perfectly.
But during onResume, when I call this function(as you’d mentioned above) this error occirs…

If I give

cb.startSession(" "," ")

just for testing it,the errors are gone, but the ads do not load anymore.
I always get “failed” [/quote]

My memory is a little hazy as I’ve been working on an unrelated project ever since, but i believe the two arguments are ( appid, appSecret), the same Chartboost app args as you pass to chartboost.init()

I’ll confirm this and get this documented tomorrow.

My apologies for the lack of documentation for the new functions i added, completely slipped my mind.

Thanks

Yeah, you must specify the Chartboost app-id and and app-sig in the call to cb.startSession().

This was a change that Chartboost made in their newest version 4.4 SDK (and the plugin uses the latest version).

So the call should be something like:

cb.startSession(“5322a830f8abababababababab”, “4d439a8f8a92f1f691dededededededededededede”)