Android Question google reject app - child directed services

samannnn

Member
B4X:
Publishing status: Rejected

Your app has been rejected and wasn't published due to a policy violation. If you submitted an update, the previous version of your app is still available on Google Play.

Issue: Violation of Families Policy Requirements

We have detected that your app includes non-certified ad SDKs or SDKs that are not approved for use in child-directed services. Any SDKs used in the app must be appropriate for use in child-directed services. Additionally, apps that solely target children must not contain any SDKs that are not approved for use in child-directed services, including ads SDKs. Apps in the Designed for Families program must only use ad SDKs that have certified their compliance with the Families Ads Program.

google reject my app because of this mail.
b4a version: 11
FirebaseAdMob2 ver 2.13
FirebaseAnalutics ver 2.00
 

DonManfred

Expert
Licensed User
Longtime User
Guess you are not allowed to use Ads in child-directed Apps.
 
Last edited:
Upvote 0

samannnn

Member
Guess you are not allowed to use Ads in child-directed Apps.
No, you are wrong. google allow developer to use Ads in child-direct Apps. but they have very difficult policy.

If your app targets children as an audience and you show ads in your app, you need to ensure your app complies with Google Play’s Families policy. AdMob offers the following tools for publishers to show ads that are compliant with Google Play’s Families policy.
https://support.google.com/admob/answer/6223431?hl=en
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

samannnn

Member
B4X:
If you are not using B4XPages, then it is better to put the MobileAds related code in the starter service.
I am not using B4XPages.
Is it enough to put the MobileAds related code in the starter service?
 
Upvote 0

samannnn

Member
i read complete thread. i should add this lines:

B4X:
Dim RequestBuilder As AdRequestBuilder
RequestBuilder .Initialize
RequestBuilder .As(JavaObject).RunMethod("setTagForChildDirectedTreatment", Array(1))
IAd.LoadAdWithBuilder(RequestBuilder)

and put the MobileAds related code in the starter service.
B4X:
Sub Service_Create
    Dim m As MobileAds
    Wait For (m.Initialize) MobileAds_Ready
End Sub
 
Upvote 0

samannnn

Member
I used the following code but program was rejected again.

B4X:
Sub Service_Create
    Dim m As MobileAds
    Wait For (m.Initialize) MobileAds_Ready
    LogColor("After MobileAds_Ready", Colors.Magenta)
 
    Dim Builder As JavaObject = m.CreateRequestConfigurationBuilder(Array(Null))
'    Builder.RunMethod("setTagForChildDirectedTreatment", Array(1)) 'TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE
 
    Builder.RunMethod("setMaxAdContentRating", Array("G"))
    m.SetConfiguration(Builder)
 
End Sub

B4X:
Sub Admob
    Ads.Initialize 'Interstitial
    CheckConsentAndAddAds
End Sub
Private Sub CheckConsentAndAddAds
'    Dim m As MobileAds
'
'    Wait For (m.Initialize) MobileAds_Ready
'    LogColor("After MobileAds_Ready", Colors.Magenta)
 
 
    If Ads.GetConsentStatus = "UNKNOWN" Then
        Wait For (Ads.RequestConsentInformation(False)) Complete (Success As Boolean)
    End If
    If Ads.GetConsentStatus = "REQUIRED" And Ads.GetConsentFormAvailable Then
        Wait For (Ads.ShowConsentForm) Complete (Success As Boolean)
    End If
    Log("Consent: " & Ads.GetConsentStatus)
    LoadAdmobAds
End Sub
Sub LoadAdmobAds
    Dim AdaptiveSize As Map = Ads.GetAdaptiveAdSize
 
    BannerAd.Initialize2("BannerAd", "ca-app-pub-********************", AdaptiveSize.Get("native"))
    Activity.AddView(BannerAd, 0, 100%y-AdaptiveSize.Get("height"), AdaptiveSize.Get("width"), AdaptiveSize.Get("height"))
    BannerAd.LoadAd
 
    IAd.Initialize("iad", "ca-app-pub-**************")
    IAd.LoadAd
 
    Ads.FetchRewardedInterstitialAd("ca-app-pub-*********", Me, "RewardedInterstitialAd")
    Ads.FetchRewardedVideoAd("ca-app-pub-***************", Me, "RewardAd")
    Ads.FetchOpenAd(AppOpenAdUnit, Me, "OpenAd")
End Sub

mybe i should change the code in this class(AdsHelper). am i right?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
mybe i should change the code in this class(AdsHelper). am i right?
No.

B4X:
Sub Service_Create
    Dim m As MobileAds
    Wait For (m.Initialize) MobileAds_Ready
    LogColor("After MobileAds_Ready", Colors.Magenta)
 
    Dim Builder As JavaObject = m.CreateRequestConfigurationBuilder(Array(Null))
   Builder.RunMethod("setTagForChildDirectedTreatment", Array(1)) 'TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE
    Builder.RunMethod("setMaxAdContentRating", Array("G"))
    m.SetConfiguration(Builder)
End Sub
 
Upvote 0
Top