Android Question Admob test mode

Discussion in 'Android Questions' started by DarkSmart, Jun 11, 2019.

  1. DarkSmart

    DarkSmart Member Licensed User

    hi
    How use test mode in firebase admob??
    Because i use emulator and ads not show
    I need test mode for test banner size and etc
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Call AdView.LoadAdWithTestDevice.
     
    DarkSmart likes this.
  3. DarkSmart

    DarkSmart Member Licensed User

    Oh,i did not see this:D
    Thanks
     
  4. DarkSmart

    DarkSmart Member Licensed User

    not worked!
    i get device id from log:
    And use this code for show test ads:
    Code:
    Sub Globals
        
    Private BannerAd As AdView
    End Sub

    Sub Activity_Create(FirstTime As Boolean)
        BannerAd.Initialize2(
    "BannerAd""ca-app-pub-3940256099942544/6300978111", BannerAd.SIZE_SMART_BANNER)
        
    Activity.AddView(BannerAd, 10%x080%x20%y)
        BannerAd.LoadAdWithTestDevice(
    "CAD8007B065E0B86EF3C52DFD5558E21")
    End Sub

    Sub BannerAd_AdScreenDismissed
        
    Log("BannerAd_AdScreenDismissed")
    End Sub

    Sub BannerAd_FailedToReceiveAd (ErrorCode As String)
        
    Log("BannerAd_FailedToReceiveAd : "&ErrorCode)
    End Sub

    Sub BannerAd_PresentScreen
        
    Log("BannerAd_PresentScreen")
    End Sub

    Sub BannerAd_ReceiveAd
        
    Log("BannerAd_ReceiveAd")
    End Sub
    but not work and not show any thing
    Also write error code zero in log after one minute!
    Log:
    What problem?
     
  5. DarkSmart

    DarkSmart Member Licensed User

    this my manifest code:
    Code:
    AddManifestText(
    <uses-sdk android:minSdkVersion=
    "14" android:targetSdkVersion="26"/>
    <supports-screens android:largeScreens=
    "true"
        android:normalScreens=
    "true"
        android:smallScreens=
    "true"
        android:anyDensity=
    "true"/>)
    CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
    CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
    CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds)
    SetApplicationAttribute(android:icon, 
    "@drawable/icon")
    SetApplicationAttribute(android:
    label"$LABEL$")
    CreateResourceFromFile(Macro, Themes.DarkTheme)
    AddPermission(android.permission.INTERNET)
    i use b4a 9.0 and api 29
    also i attached sdk manager screenshot (please see)

    sdk1.jpg sdk2.jpg sdk3.jpg
     
  6. DonManfred

    DonManfred Expert Licensed User

    you should use the B4A SDK Manager. The old SDK Manager is no longer useable.

    See the installationnstructions: https://www.b4x.com/b4a.html#installation

    watch the Video, start with a blank folder for the SDK.
     
    DarkSmart likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice