I've been trying to get ads working in Gideros 2016-04 over the past few days, but I can't work out why ads are not being displayed. Can anyone point me in the right direction? I can't see the wood for the trees now!!!!
Here are the results of my tests:
1) The logcat output file attached indicates that ads are requested and loaded, but nothing is displayed apart from a white screen. There are also a lot of "can not find class: xxxx" in the log, I've googled it, but I don't know what the error is, or how to fix it. Any ideas?
2) Here is the Android manifest:
<application android:icon="<a href="https://forum.giderosmobile.com/profile/drawable%2Ficon%26quot" rel="nofollow">@drawable/icon"</a>; android:label="<a href="https://forum.giderosmobile.com/profile/string%2Fapp_name%26quot" rel="nofollow">@string/app_name"</a>; android:theme="<a href="https://forum.giderosmobile.com/profile/android" rel="nofollow">@android</a>:style/Theme.NoTitleBar.Fullscreen">
<!-- google play -->
<meta-data android:name="com.google.android.gms.version" android:value="<a href="https://forum.giderosmobile.com/profile/integer%2Fgoogle_play_services_version%26quot" rel="nofollow">@integer/google_play_services_version"</a>; />
<!-- AppLovin -->
<meta-data android:name="applovin.sdk.key" android:value="xxxxxxx" />
<!-- facebook -->
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="<a href="https://forum.giderosmobile.com/profile/string%2Ffacebook_app_id%26quot" rel="nofollow">@string/facebook_app_id"</a>;/>
<activity android:label="<a href="https://forum.giderosmobile.com/profile/string%2Fapp_name%26quot" rel="nofollow">@string/app_name"</a>; android:name="com.giderosmobile.android.SpeedyGramActivity" android:launchMode="singleTask" android:screenOrientation="sensorLandscape" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<activity android:name="com.applovin.adview.AppLovinInterstitialActivity" />
<activity android:name="com.applovin.adview.AppLovinConfirmationActivity" />
<activity android:name="com.facebook.LoginActivity" android:theme="<a href="https://forum.giderosmobile.com/profile/android" rel="nofollow">@android</a>:style/Theme.Translucent.NoTitleBar" android:label="<a href="https://forum.giderosmobile.com/profile/string%2Fapp_name%26quot" rel="nofollow">@string/app_name"</a>; />
<!-- TAG:APPLICATION-EXTRA -->
</application>
</manifest> |
3) Here is the test app that I used to test my custom player:
require "ads"
print("ads require")
ads = Ads.new("admob")
ads:addEventListener(Event.AD_RECEIVED, function()
print("ads AD_RECEIVED")
end)
ads:addEventListener(Event.AD_FAILED, function(e)
print("ads AD_FAILED", e.error)
end)
ads:addEventListener(Event.AD_ACTION_BEGIN, function()
print("ads AD_ACTION_BEGIN")
end)
ads:addEventListener(Event.AD_ACTION_END, function()
print("ads AD_ACTION_END")
end)
ads:addEventListener(Event.AD_DISMISSED, function()
print("ads AD_DISMISSED")
end)
ads:addEventListener(Event.AD_ERROR, function(e)
print("ads AD_ERROR", e.error)
end)
ads:setKey("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
print("set key")
ads:showAd("banner")
print("show banner") |
4) Here is the console output that shows that the plugin is initialised and an ad was received.
adframeworks/admob.lua is uploading.
Uploading finished.
ads require
set key
show banner
ads AD_RECEIVED |
Comments
http://docs.giderosmobile.com/interface/ads
don't remember, have not used them for a while
ca-app-pub-xxxxxxxxxxx/yyyyyyyyyyyy
The app is linked to our adMob account and impressions have been recorded (just 2).
I used your code above, but I had to change the following line of code:
Maybe there is an ad blocker on that device, or something like that?
UPDATE: I just checked my phone and noticed an app called "Browser". It was the last app that was installed on my device, so I uninstalled it. The ads now appear now.
I have no idea how it got there as I only download apps that are available on Google play.
Thanks @ar2rsawseen for your help.