Hey guys, I've tried to make just a little simple ad to be displayed while running on one application
.
I've tried to read more info on
- > https://www.appgamekit.com/documentation/Reference/Advert/CreateAdvert.htm
To see if I'm wrong with the code somewhere , but not here
Also, tried to read this :
-> https://www.appgamekit.com/documentation/Reference/Advert/SetAdMobDetails.htm
First question . No ad will be displayed while clicking the "Run" to test my build on windows?
Also after a short search of the forum , I found a code for AdMob ( didn't worked for me )
SetAdMobDetails("ca-app-pub-7************1/1******9")
CreateAdvert(0,1,1,0)
SetAdvertVisible(1)
RequestAdvertRefresh()
do
Print( ScreenFPS() )
Sync()
loop
After reading a little bit of more information I made the following code for the test
// Created: 2016-10-10
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "ads" )
SetWindowSize( 800, 600, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetAdMobDetails("ca-app-pub-7************1/1******9") //
//Create and Position the Advert
CreateAdvert(0, 1, 1, 1)
//Make Advert Visible
SetAdvertVisible ( 1 )
//Reload/Refresh Advert, call occasionally
DisplayAdCount = 0
do
if DisplayAdCount = 0
ShowFullscreenAdvertAdMob()
DisplayAdCount = 1
endif
Print( ScreenFPS() )
Sync()
loop
The SetAdMobDetails was created using the apps.admob.com
Where I am wrong?
It's something I'm missing in the code?
Also i've tested on Android device and still the ads are not displayed.
It's because i wanted to create a banner ? or what should i select in order to have the ads displayed ?
The application has not been published on the gplay . This should be the problem? The un-linked to app system ?
Thanks