Suggestion Issue: Include a block in AdMob to adhere to App Store and Google Play family policy


Pages: 1

mbergoei

  • Subscriber - Stencyl Studio
  • *
October 26, 2020, 02:21:51 pm
Hi, per Play Store requirements, if the app is targeted for children, it must include a code that states so and the max content rating.:

Apps for everyone, including children and families
If your app is targeted towards everyone, including children and families, you’ll need to include code that calls the tagForChildDirectedTreatment()method for ad requests served to children and also specify the maximum ad content rating.

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

Thanks!

M
« Last Edit: October 26, 2020, 05:25:04 pm by mbergoei »


Justin

  • Master Stencyler
  • *
October 26, 2020, 07:52:40 pm
Ack, there was a forum thread about this too.

http://community.stencyl.com/index.php/topic,60933.0.html

It never made it onto the issue tracker, so it completely slipped my mind. I'll assign this to the next minor feature release.
  • Tags added: 4.1.0


mbergoei

  • Subscriber - Stencyl Studio
  • *
October 27, 2020, 09:53:52 am
Great!!!!!

In the meantime, is there a workaround (in Stencyl I mean) to comply?

Thanks!!!


Justin

  • Master Stencyler
  • *
October 27, 2020, 10:21:02 am
The java sources for the admob code built in to Stencyl are found in your Stencyl install at plaf/haxe/extensions/ads/dependencies/admob/src/com/byrobin/admobex/AdMobEx.java.

The code change required would be to include, in the "buildAdReq" method (starting on line 291), the following lines.

Code: [Select]
builder.tagForChildDirectedTreatment(true);
builder.setMaxAdContentRating(AdRequest.MAX_AD_CONTENT_RATING_G);

Those lines should be added before adReq = builder.build();.

For example:

Code: [Select]
public static void buildAdReq(boolean npa)
{
AdRequest.Builder builder = new AdRequest.Builder();
builder.addTestDevice(AdRequest.DEVICE_ID_EMULATOR);
if (testingAds)
{
builder.addTestDevice(deviceId);
}
if (npa)
{
Log.d(TAG,"Building ad request for non-personalized ads.");
Bundle extras = new Bundle();
extras.putString("npa", "1");
builder.addNetworkExtrasBundle(AdMobAdapter.class, extras);
}
else
{
Log.d(TAG,"Building ad request for personalized ads.");
}
builder.tagForChildDirectedTreatment(true);
builder.setMaxAdContentRating(AdRequest.MAX_AD_CONTENT_RATING_G);
adReq = builder.build();
}

That's all that's required on the code side if you just want to force it to always serve ads for kids. The problem is, I'm not sure that code will work without also updating the AdMob SDK, and I'm not sure that the SDK can be updated without needing to make other changes in Stencyl.

If it doesn't work, let me know if this is urgent or if you have a rough time that you'll need this by and I'll try to get around to it before then.
« Last Edit: October 27, 2020, 10:21:54 am by Justin »


mbergoei

  • Subscriber - Stencyl Studio
  • *
October 27, 2020, 05:18:26 pm
I'll give it a ride tomorrow and let you know.

Thx!

MB


mbergoei

  • Subscriber - Stencyl Studio
  • *
October 28, 2020, 05:05:53 am
Hi, it failed and exited the build.

The log:

Code: [Select]
2020-10-28 09:02:22,392 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] Transforming gson-2.8.4.jar (com.google.code.gson:gson:2.8.4) with JetifyTransform
2020-10-28 09:02:22,392 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] Transforming gson-2.8.4.jar (com.google.code.gson:gson:2.8.4) with IdentityTransform
2020-10-28 09:02:22,392 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] Full recompilation is required because no incremental change information is available. This is usually caused by clean builds or changing compiler arguments.
2020-10-28 09:02:22,392 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] file or directory '/Users/Michel/stencylworks/games-generated/Domino_Android/Export/android/bin/deps/admob/src/release/java', not found
2020-10-28 09:02:22,392 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] file or directory '/Users/Michel/stencylworks/android-builds/Domino_Android/admob/generated/aidl_source_output_dir/release/out', not found
2020-10-28 09:02:22,392 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] file or directory '/Users/Michel/stencylworks/android-builds/Domino_Android/admob/generated/renderscript_source_output_dir/release/out', not found
2020-10-28 09:02:22,392 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] Compiling with JDK Java compiler API.
2020-10-28 09:02:22,392 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] /Users/Michel/stencylworks/games-generated/Domino_Android/Export/android/bin/deps/admob/src/com/byrobin/admobex/AdMobEx.java:311: error: cannot find symbol
2020-10-28 09:02:22,392 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] builder.setMaxAdContentRating(AdRequest.MAX_AD_CONTENT_RATING_G);
2020-10-28 09:02:22,392 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib]                                        ^
2020-10-28 09:02:22,392 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib]   symbol:   variable MAX_AD_CONTENT_RATING_G
2020-10-28 09:02:22,392 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib]   location: class AdRequest
2020-10-28 09:02:22,392 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] Note: /Users/Michel/stencylworks/games-generated/Domino_Android/Export/android/bin/deps/admob/src/com/byrobin/admobex/AdMobEx.java uses or overrides a deprecated API.
2020-10-28 09:02:22,392 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] Note: Recompile with -Xlint:deprecation for details.
2020-10-28 09:02:22,392 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] 1 error
2020-10-28 09:02:22,392 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] Task :deps:admob:compileReleaseJavaWithJavac in app Finished
2020-10-28 09:02:22,393 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] :deps:admob:compileReleaseJavaWithJavac (Thread[Execution worker for ':' Thread 2,5,main]) completed. Took 0.472 secs.
2020-10-28 09:02:22,393 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] :deps:google:generateReleaseRFile (Thread[Execution worker for ':' Thread 3,5,main]) completed. Took 0.764 secs.
2020-10-28 09:02:22,393 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] :deps:purchases:generateReleaseRFile (Thread[Execution worker for ':',5,main]) completed. Took 0.486 secs.
2020-10-28 09:02:22,393 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] AAPT2 aapt2-4.1.0-6503028-osx Daemon #0: shutdown
2020-10-28 09:02:22,393 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] AAPT2 aapt2-4.1.0-6503028-osx Daemon #1: shutdown
2020-10-28 09:02:22,393 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] AAPT2 aapt2-4.1.0-6503028-osx Daemon #2: shutdown
2020-10-28 09:02:22,393 INFO  [Thread-12] stencyl.sw.util.StreamGobbler: [haxelib] AAPT2 aapt2-4.1.0-6503028-osx Daemon #3: shutdown
2020-10-28 09:02:22,393 ERROR [Thread-12] stencyl.sw.util.dg.MessageDialog: Encountered errors while building your game.: Check your logs and post them to the forums.  - Please describe what you have been doing. Be as specific as possible.
2020-10-28 09:02:22,884 DEBUG [pool-1-thread-1] stencyl.sw.util.Util: Process 'haxelib' exited with code: 1
2020-10-28 09:02:24,589 DEBUG [pool-1-thread-2] stencyl.sw.util.FileHelper: Matching (non-hidden) files within /Users/Michel/stencylworks/logs: [/Users/Michel/stencylworks/logs/2020-10-28_08-23-44.log]

I am ready to submit to the Store. I will see if setting rating G at the AdMob console is enough. I'll let you know.

Thx!
« Last Edit: October 28, 2020, 06:59:03 am by Justin »


mbergoei

  • Subscriber - Stencyl Studio
  • *
November 01, 2020, 02:14:38 pm
Hi!

Google Play Store accepted the app for publication (yeah!) although it didn't have the specific lines of code. I did set the ad rating to "G" at the AdMob console. I'll update if I encounter any other issues with this.

Thx.

M


Pages: 1

Details

  • Reported
    October 26, 2020, 02:21:51 pm
  • Updated
    November 01, 2020, 02:14:38 pm

  • View Status
    Public
  • Type
    Suggestion
  • Status
    New
  • Priority
    Normal
  • Version
    (none)
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    (none)

Tags