- Home /
Question by
siddharth3322 · Nov 20, 2015 at 03:00 PM ·
iosadsfullscreenrevmob
RevMob session start acknoledgement
I want to put RevMob ads into my game. For this I used following website help to move ahead.
I have written complete script for it. I want to preload fullscreen ad then I want to show it. This reason I want to detect session is started and then I want to pass ad request.
Here is my full script :
private static readonly Dictionary<String, String> REVMOB_APP_IDS = new Dictionary<String, String> () {
{ "Android", "copy your Android RevMob Media ID here"},
{ "IOS", "copy your Android RevMob Media ID here" }
};
private RevMob revmob;
private RevMobFullscreen fullscreen;
void Awake ()
{
instance = this;
revmob = RevMob.Start (REVMOB_APP_IDS, "AppController");
}
private void RequestRevMobFullScreen ()
{
Debug.Log("request revmob full screen method called......");
fullscreen = revmob.CreateFullscreen ();
}
public void ShowRevMobFullScreen ()
{
if (fullscreen != null)
fullscreen.Show ();
else
Debug.Log("show revmob full screen method called......");
}
#region IRevMobListener implementation
public void SessionIsStarted ()
{
Debug.Log (">>> Session Started");
RequestRevMobFullScreen ();
revmob.SetTestingMode(RevMob.Test.WITH_ADS);
}
public void UserClosedTheAd (string revMobAdType)
{
Debug.Log (">>> AdClosed: " + revMobAdType);
RequestRevMobFullScreen ();
}
In above code, SessionIsStarted() method is listener not called any time so my RequestRevMobFullScreen() method was not called.
Basically I just want to preload my ads. If you have any strategy then please suggest it to me.
Comment
Answer by theindiandood · Feb 05, 2016 at 04:44 PM
do you have the IRevMobListener interface implemented.