Hello.
Goole has informed me that my app is in violation of the Family Policy.
Family Policy:
https://support.google.com/googleplay/android-developer/answer/9893335#families-policyViolation items:
Device identifier that was confirmed to be sent ... Android Ad ID
<<<< Premises >>>>
In order to comply with this policy, I need to stop sending Android Ad Identifier (AAID) by including the following code.
[How to respond]
https://developers.google.com/admob/android/targeting?hl=en[Description code]
RequestConfiguration requestConfiguration = MobileAds.getRequestConfiguration()
.toBuilder()
.setTagForChildDirectedTreatment(RequestConfiguration.TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE)
.build();
MobileAds.setRequestConfiguration(requestConfiguration);
<<<< question >>>>
1. Is AppActivity.java the right place to put the [Description code]?
I have searched several sites and found that it is supposed to be in MainActivity.java.
In my app building environment, I have AppActivity.java, but I could not find MainActivity.java.
My environment:.
Implementation of ads: SDK + Admob
App building environment: Android Studio + cocos2d-x
【Path of AppActivity.java】
C:\App\TouhouTNA02\
proj.android\app\src\org\cocos2dx\cpp\AppActivity.java
2. If it is correct in AppActivity.java, where should the [Description code] be placed in the following [// DO OTHER INITIALIZATION BELOW]?
[Contents of AppActivity.java]
---- start ----
package org.cocos2dx.cpp;
import android.os.Bundle;
import org.cocos2dx.lib.Cocos2dxActivity;
public class AppActivity extends com.sdkbox.plugin.SDKBoxActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.setEnableVirtualButton(false);
super.onCreate(savedInstanceState);
// Workaround in
https://stackoverflow.com/questions/16283079/re-launch-of-activity-on-home-button-but-only-the-first-time/16447508 if (!isTaskRoot()) {
// Android launched another instance of the root activity into an existing task
// so just quietly finish and go away, dropping the user back into the activity
// at the top of the stack (ie: the last state of this task)
// Don't need to finish it again since it's finished in super.onCreate .
return;
}
// DO OTHER INITIALIZATION BELOW
}
}
---- end ----
Please contact me with any other information needed for verification.
Regards,
S.L.