Dear Cerberus X User!
As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.
Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.
Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!
Accepting ensures:
- Continued access to your account with a short break for the actual transfer.
- Retention of your data under the same terms.
Without consent:
- You don't have further access to your forum user account.
- Your account and personal data will be deleted after April 5, 2024.
- Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.
We hope to keep you in our community and see you on the forum soon!
All the best
Your Cerberus X Team
#If TARGET<>"android" And TARGET<>"ios"
#Error "Admob is only supported on Android and iOS targets"
#End
#ANDROID_LOGCAT_OPTION="-s [Cerberus]:E"
Import mojo
Import brl.admob
' FIND THESE STRINGS BY JUST FOLLOWING THE SCREENSHOTS :
' APP-ID : ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy (you see this on screenshot 4, the top ID with an Android icon, it's common for all ads)
' AD-ID (FULLSCREEN-AD) : ca-app-pub-xxxxxxxxxxxxxxxx/aaaaaaaaaa ' (you see this on screenshot 4, the bottom)
' AD-ID (BANNER-AD) : ca-app-pub-xxxxxxxxxxxxxxxx/bbbbbbbbbb ' (you see this on screenshot 4, the bottom, after done the same for the other ad)
' WRITE YOUR APP ID HERE (don't forget to add an additional ~ because how strings manages special symbols)
#ADMOB_ANDROID_ADS_APPID = "ca-app-pub-xxxxxxxxxxxxxxxx~~yyyyyyyyyy"
' WRITE YOUR BANNER-AD ID HERE
#ADMOB_PUBLISHER_ID = "ca-app-pub-xxxxxxxxxxxxxxxx/aaaaaaaaaa"
Class MyApp Extends App
Field admob:Admob
Field interstitialAdmob:AdmobInterstitial
Field layout:=1
Field state:=1
Method OnCreate()
admob=Admob.GetAdmob()
admob.ShowAdView 1,layout
' WRITE YOUR INTERSITIAL-AD ID HERE
interstitialAdmob = AdmobInterstitial.GetAdmobInterstitial("ca-app-pub-xxxxxxxxxxxxxxxx/bbbbbbbbbb")
SetUpdateRate 60
End
Method OnUpdate()
If MouseHit( 0 )
If state = 3
admob.HideAdView
state+=1
Else If state = 1
layout+=1
If layout=7 layout=1
admob.ShowAdView 1,layout
state+=1
Else If state = 2
admob.HideAdView
interstitialAdmob.ShowAdViewInterstitial
state+=1
End
End
End
Method OnRender()
Local en:="disabled"
If state=2 en="enabled"
Cls
PushMatrix
Scale 2,2
DrawText "Click to toggle ads! ads are currently "+en,DeviceWidth/4,DeviceHeight/4,.5,.5
PopMatrix
End
End
Function Main()
New MyApp
End
If I'm right, ADMOB_PUBLISHER_ID in the examplecode is actually supposed to be the banner-ad ID?
Method OnResume:Int()
'
admob.ShowAdView 1,5
Return 0
End method