Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/231.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
android中.tagForChildDirectedTreatment(true)和.setIsDesignedForFamilies(true)之间的区别是什么_Android - Fatal编程技术网

android中.tagForChildDirectedTreatment(true)和.setIsDesignedForFamilies(true)之间的区别是什么

android中.tagForChildDirectedTreatment(true)和.setIsDesignedForFamilies(true)之间的区别是什么,android,Android,我想在我的儿童应用程序中添加一些广告,我遇到了以下示例 final AdView adView = (AdView) findViewById(R.id.adView); Bundle extras = new Bundle(); extras.putBoolean("is_designed_for_families", true); AdRequest adRequest = new AdRequest.Builder() .addTestDevice(AdReques

我想在我的儿童应用程序中添加一些广告,我遇到了以下示例

final AdView adView = (AdView) findViewById(R.id.adView);
Bundle extras = new Bundle();
extras.putBoolean("is_designed_for_families", true);
AdRequest adRequest = new AdRequest.Builder()
            .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
            .addNetworkExtrasBundle(AdMobAdapter.class, extras)
            .tagForChildDirectedTreatment(true)
            .build();
    adView.loadAd(adRequest);


    final AdView adView = (AdView) findViewById(R.id.adView);
    AdRequest adRequest = new AdRequest.Builder()
            .setIsDesignedForFamilies(true)
            .setRequestAgent("android_studio:ad_template").build();
    adView.loadAd(adRequest);

但是这两者之间有什么区别呢?这和记忆有关吗

通过应用.tagForChildDirectedTreatment(true)标记,应用程序将显示与添加相关的子项