freshplanet / ANE-Chartboost

Air Native Extension for Chartboost (iOS + Android)
Apache License 2.0
36 stars 28 forks source link

Did fail to load interstitial for location "Default". #12

Closed onatbas closed 3 years ago

onatbas commented 11 years ago

Hello, i'm having difficulties using Chartboost, I've set up a publishing campaign from dashboard, i have my device as a test device, I've added an android application(which is on market, i've selected it from the list) and published.

In game, whenever i request an interstitial AirChartboost.getInstance().showInterstitial(); i get this>

[Chartboost] Should request interstitials in first session? Yes. [Chartboost] Should request interstitial for location "Default"? Yes. [Chartboost] Did fail to load interstitial for location "Default".

it appears i'm not having any connection problems.

How can i solve this?

ataugeron commented 11 years ago

Could be Chartboost not serving any ads to your device. Have you tried with other devices? Have you try setting your app in test mode in Charboost dashboard?

onatbas commented 11 years ago

Device is S 3 i dont think Chartboost wont be serving to that, and yes , i added the device as a test device.

onatbas commented 11 years ago

I've tested on various devices, result is the same :/

Vlad-UA commented 11 years ago

I have the same problem https://github.com/freshplanet/ANE-Chartboost/issues/9 my mobile Samsung Galaxy S 1, Android 2.3.3 maybe this is problem with Samsung Galaxy S line

in4ray commented 11 years ago

I have the same issue with my Amazon Kindle Fire device. Probably this issue may relate to => Using Open GL by chance? Please be sure to set cb.setImpressionsUseActivities(true); (from https://help.chartboost.com/documentation/android).

Is there any way to extend ANE with setImpressionsUseActivities method? I think it worth to try. Thanks ahead!

thpramos commented 11 years ago

I was having the same problem and found out that the reason I was getting that was because my app configuration was set to landscape. And the example setup looks to be asking for portrait ones. So doing : this.cb.setOrientation(CBOrientation.LANDSCAPE);

worked like a charm and solved my problem! Probably this will help lots of people cause their help page has nothing telling about that. :)

onatbas commented 11 years ago

Hmm, indeed we use the application in landspace mode, is it possible for you to share fixzed version ?

thpramos commented 11 years ago

In my solution I have a singleton AdsManager that controls the whole ad stuff. But what matters for me is that I use OpenGL in my game so i had to set the last line too. Just remember that if you set that line, you'll have to put some code on the AndroidManifest too.

getInstance().cb = Chartboost.sharedChartboost();
getInstance().cb.onCreate(AdsManager.getActivity(), CHARTBOOST_APPID, CHARTBOOST_APPSIGNATURE, getInstance().chartBoostDelegate);
getInstance().cb.setOrientation(CBOrientation.LANDSCAPE);
getInstance().cb.setImpressionsUseActivities(true);

Hope this helps!

danielksa commented 11 years ago

Guys,has anyone come up with an answer already? By the way,thpramos,thanks for an advice.What exactly am i supposed to declare in Android Manifest?

thpramos commented 11 years ago

The following lines:

<activity android:name="com.chartboost.sdk.CBImpressionActivity"
    android:excludeFromRecents="true"
    android:theme="@android:style/Theme.Translucent.NoTitleBar"/>

Hope this helps.

ivodopiviz commented 10 years ago

Any news on this? I'm having the very same issue.

By the way, this is all the output I get:

[Chartboost] Should request interstitials in first session? Yes. [Chartboost] Should request interstitial for location "Default"? Yes. [Chartboost] Should display loading view for More Apps? Yes. [Chartboost] Should display interstitial for location "Default"? Yes.

There doesn't seem to be any errors, but it just won't work on Android. iOS works fine, though.

peterkorodi commented 10 years ago

I had the same issue with my android OpenGL game Precopter.

Init chartboost like this:

cb.onCreate(this, appId, appSignature, chartBoostDelegate);
CBPreferences.getInstance().setOrientation(CBOrientation.LANDSCAPE);
CBPreferences.getInstance().setImpressionsUseActivities(true);

I have to call showInterstitial from the main thread (without this chartboost crashes):

activity.runOnUiThread(new Runnable() {
        public void run() {
        cb.showInterstitial();
    }
});

My app is a landscape app. On the chartboost dashboard first I set both orientations (landscape and portrait). After I set just landscape orientation on the dashboard and put following lines into the AndroidManifest.xml

<activity android:name="com.chartboost.sdk.CBImpressionActivity"
    android:excludeFromRecents="true"
    android:theme="@android:style/Theme.Translucent.NoTitleBar"/>

It worked like a charm. hope this helps!