B4A Library AdMob library

scsjc

Well-Known Member
Licensed User
Longtime User
Hello,
i have a question, is possible preload library in SERVICE... before open at ACTIVITY....
(because it's slow to show, and sometimes close activity without load)
 

Jack Cole

Well-Known Member
Licensed User
Longtime User
Can we get this library updated to support Google Play's designed for families program?

https://support.google.com/admob/answer/6223431?hl=en

Specifically, I am referring to the following:
Mixed-audience apps are apps that target both child and adult audiences and opt into the Designed for Families program. These apps will need to include code that sets "is_designed_for_families" to true and calls thetagForChildDirectedTreatment() method for ad requests served to a child audience. Upon seeing both"is_designed_for_families" and tagForChildDirectedTreatment() set to true, AdMob will return Designed for Families-compliant ads for that ad request.

Thank you!
Jack
 

Jack Cole

Well-Known Member
Licensed User
Longtime User
With the latest revision of Google Play Services (ver 28), I get the following error on many (but not all) devices.


I have tried including android-support-v4.jar in the project, but it makes no difference. If I downgrade to rev 27, it works fine. Unfortunately, I need to use the latest version for advanced features. Any ideas?

Jack
 

schwisti

Member
Licensed User
Longtime User
Hello,
I've some Problems with AdMob.
That is what I did:

Manifest:
B4X:
'AdMob
AddApplicationText(
<meta-data android:name="com.google.android.gms.version"
  android:value="@integer/google_play_services_version"/>
<activity android:name="com.google.android.gms.ads.AdActivity"
  android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>

)
'End of AdMob

Main:
B4X:
...
#CanInstallToExternalStorage: True
    #AdditionalRes: F:\android-sdks\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms

#End Region
...

B4X:
Sub Globals
...
Dim AdView1 As AdView
...
Ende Sub

B4X:
AdView1.Initialize2("Ad", "ca-app-pub-6365xxxxxxxxxxxx/xxxxxxxx29", AdView1.SIZE_SMART_BANNER)
    Activity.AddView(AdView1, 0dip, 0dip, 320dip, 50dip)' AdView1.LoadAd 'loads an ad
    AdView1.LoadAd
...
End Sub

Sub Ad_FailedToReceiveAd (ErrorCode As String)
    Log("failed to load Ad: " & ErrorCode)
End Sub
Sub Ad_ReceiveAd
    Log("received")
End Sub
Sub Ad_AdScreenDismissed
   Log("screen dismissed")
End Sub

Debugging shows:
"failed to load Ad: 0"

I've the actual google play jar in my additional folder. The actual AdMob library (2.0) as well.
Any ideas?

Thank you very much!
 

schwisti

Member
Licensed User
Longtime User
Thank you for your fast answer...
I created a new Ad in AdMob with a new code....same error 0
Is it OK, that I use "F:\android-sdks\platforms\android-23\android.jar", because if I use android-19, there'll come an error.
I test the app on a Samsung Galaxy S4 mini with Android 4.4.2
 

schwisti

Member
Licensed User
Longtime User
Ok'll wait...

I found this in the Log:

Is there something missing? method com.google.android.gms.common.zze.zzi??

Thank you!!
 

schwisti

Member
Licensed User
Longtime User
I found it.......
In the file "host" are IPs, that goes to Doubleclick, above a comment "this file is from Adaway", but I don't installed this app. So I downloaded it and clicked on "disable add blocking"... now it works on my "old" version of my app. When I'll arrive at home, I'll check it with the new one as well.... Thank you very much for your help!!
 

sorex

Expert
Licensed User
Longtime User
Does this library support these interstitial ads or do I need some additional lib/jar?

When I add an adview and enter my interstitial "key" nothing appears.

my admob library in B4A is 2.00 and path is set to API14.

a regular banner displays fine tho.
 

Douglas Farias

Expert
Licensed User
Longtime User

sorex

Expert
Licensed User
Longtime User
ok thanks, that seemed to work as I got a screen telling me I had to date an older woman, lol

It would be nice if this could be included into the standard AdMob library like it is for IOS.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…