neither test ads nor real ads are showing on real phone,
created a admob project,did exactly what the tutorial said,but while runing the game in unity in console .
it is saying dummy add created,dummy ad shown,but on real phone nothing is showing not even test ad,
1. my setup is like this: got admob
2. plugin from github imported it to
3. unity created an empty object in scene
3. added a script to the empty
object
using GoogleMobileAds.Api;
//dawd
public class GoogleMobileAdsDemoScript : MonoBehaviour
{
private BannerView bannerView;
…
public void Start()
{
#if UNITY_ANDROID
string appId = "ca-app-pub-3940256099942544~3347511713";
#elif UNITY_IPHONE
string appId = "ca-app-pub-3940256099942544~1458002511";
#else
string appId = "unexpected_platform";
#endif
// Initialize the Google Mobile Ads SDK.
MobileAds.Initialize(appId);
this.RequestBanner();
}
private void RequestBanner()
{
#if UNITY_ANDROID
string adUnitId = "ca-app-pub-3940256099942544/6300978111";
#elif UNITY_IPHONE
string adUnitId = "ca-app-pub-3940256099942544/2934735716";
#else
string adUnitId = "unexpected_platform";
#endif
// Create a 320x50 banner at the top of the screen.
bannerView = new BannerView(adUnitId, AdSize.Banner, AdPosition.Top);
AdRequest request = new AdRequest.Builder().Build();
// Load the banner with the request.
bannerView.LoadAd(request);
}
}
yet nothing is showing up on screen
↧