I want to put RevMob ads into my game. For this I used following website help to move ahead.
[RevMob Integration SDK][1]
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 REVMOB_APP_IDS = new Dictionary () {
{ "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.
[1]: http://sdk.revmobmobileadnetwork.com/unity.html#listeners
↧