当前位置: 首页>>代码示例>>Java>>正文


Java AdSettings.addTestDevice方法代码示例

本文整理汇总了Java中com.facebook.ads.AdSettings.addTestDevice方法的典型用法代码示例。如果您正苦于以下问题:Java AdSettings.addTestDevice方法的具体用法?Java AdSettings.addTestDevice怎么用?Java AdSettings.addTestDevice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.facebook.ads.AdSettings的用法示例。


在下文中一共展示了AdSettings.addTestDevice方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import com.facebook.ads.AdSettings; //导入方法依赖的package包/类
public static void init(Context context) {
    
    AdSettings.setMediationService(MEDIATION_SERVICE_NAME);
    AdSettings.setIsChildDirected(PNSettings.isCoppaModeEnabled);
    if (PNSettings.isTestModeEnabled) {
        AdSettings.addTestDevice(PNCrypto.md5(PNSettings.advertisingId));
        FacebookTestModeHelper.updateHashId(context, PNCrypto.md5(PNSettings.advertisingId));
    }
}
 
开发者ID:pubnative,项目名称:pubnative-android-sdk,代码行数:10,代码来源:Facebook.java

示例2: addTestDevice

import com.facebook.ads.AdSettings; //导入方法依赖的package包/类
@ReactMethod
public void addTestDevice(String deviceHashedId) {
    if (deviceHashedId == "current") {
        SharedPreferences sp = getReactApplicationContext()
            .getSharedPreferences("FBAdPrefs", 0);

        deviceHashedId = sp.getString("deviceIdHash", null);
    }
    AdSettings.addTestDevice(deviceHashedId);
}
 
开发者ID:callstack,项目名称:react-native-fbads,代码行数:11,代码来源:AdSettingsManager.java

示例3: onCreateView

import com.facebook.ads.AdSettings; //导入方法依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    v = inflater.inflate(R.layout.layout_aspor_fragment, container, false);

    swipeRefreshLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_refresh_layout);
  /*  alertDialog=new SpotsDialog(getActivity(),R.style.Custom_Progress_Dialog);
    setCustomAlertDialog();*/
    // fillTheData();


    swipeRefreshLayout.setOnRefreshListener(this);

    // Configure the refreshing colors
    swipeRefreshLayout.setColorSchemeResources(android.R.color.holo_blue_bright,
            android.R.color.holo_green_light,
            android.R.color.holo_orange_light,
            android.R.color.holo_red_light);

    swipeRefreshLayout.post(new Runnable() {
                                @Override
                                public void run() {
                                    swipeRefreshLayout.setRefreshing(true);

                                    fetchAllNews();
                                    swipeRefreshLayout.setRefreshing(false);
                                }
                            }
    );

    //init native ads manager
    listNativeAdsManager = new NativeAdsManager(getActivity(),
            getString(R.string.test_facebook_unit_id),
            getResources().getInteger(R.integer.max_pull_ad_number));
    if (getString(R.string.test_ad_mode).equals("T")){
        AdSettings.addTestDevice(getString(R.string.test_device_id));
    }
    listNativeAdsManager.setListener(this);
    listNativeAdsManager.loadAds();
    return v;
}
 
开发者ID:aknkaplanoglu,项目名称:Sportmix,代码行数:42,代码来源:TrtsporFragment.java

示例4: onCreateView

import com.facebook.ads.AdSettings; //导入方法依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    v = inflater.inflate(R.layout.layout_fotomac_fragment, container, false);

    swipeRefreshLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_refresh_layout);
  /*  alertDialog=new SpotsDialog(getActivity(),R.style.Custom_Progress_Dialog);
    setCustomAlertDialog();*/
    // fillTheData();


    swipeRefreshLayout.setOnRefreshListener(this);

    // Configure the refreshing colors
    swipeRefreshLayout.setColorSchemeResources(android.R.color.holo_blue_bright,
            android.R.color.holo_green_light,
            android.R.color.holo_orange_light,
            android.R.color.holo_red_light);

    swipeRefreshLayout.post(new Runnable() {
                                @Override
                                public void run() {
                                    swipeRefreshLayout.setRefreshing(true);

                                    fetchAllNews();
                                    swipeRefreshLayout.setRefreshing(false);
                                }
                            }
    );

    //init native ads manager
    listNativeAdsManager = new NativeAdsManager(getActivity(),
            getString(R.string.test_facebook_unit_id),
            getResources().getInteger(R.integer.max_pull_ad_number));
    if (getString(R.string.test_ad_mode).equals("T")){
        AdSettings.addTestDevice(getString(R.string.test_device_id));
    }
    listNativeAdsManager.setListener(this);
    listNativeAdsManager.loadAds();
    return v;
}
 
开发者ID:aknkaplanoglu,项目名称:Sportmix,代码行数:42,代码来源:FotomacFragment.java

示例5: onCreateView

import com.facebook.ads.AdSettings; //导入方法依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    v = inflater.inflate(R.layout.layout_sporx_fragment, container, false);

    swipeRefreshLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_refresh_layout);
  /*  alertDialog=new SpotsDialog(getActivity(),R.style.Custom_Progress_Dialog);
    setCustomAlertDialog();*/
    // fillTheData();


    swipeRefreshLayout.setOnRefreshListener(this);

    // Configure the refreshing colors
    swipeRefreshLayout.setColorSchemeResources(android.R.color.holo_blue_bright,
            android.R.color.holo_green_light,
            android.R.color.holo_orange_light,
            android.R.color.holo_red_light);

    swipeRefreshLayout.post(new Runnable() {
                                @Override
                                public void run() {
                                    swipeRefreshLayout.setRefreshing(true);

                                    fetchAllNews();
                                    swipeRefreshLayout.setRefreshing(false);
                                }
                            }
    );

    //init native ads manager
    listNativeAdsManager = new NativeAdsManager(getActivity(),
            getString(R.string.test_facebook_unit_id),
            getResources().getInteger(R.integer.max_pull_ad_number));
    if (getString(R.string.test_ad_mode).equals("T")){
        AdSettings.addTestDevice(getString(R.string.test_device_id));
    }
    listNativeAdsManager.setListener(this);
    listNativeAdsManager.loadAds();
    return v;
}
 
开发者ID:aknkaplanoglu,项目名称:Sportmix,代码行数:42,代码来源:SporxFragment.java

示例6: onCreateView

import com.facebook.ads.AdSettings; //导入方法依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    v = inflater.inflate(R.layout.layout_sabah_fragment, container, false);

    swipeRefreshLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_refresh_layout);
  /*  alertDialog=new SpotsDialog(getActivity(),R.style.Custom_Progress_Dialog);
    setCustomAlertDialog();*/
    // fillTheData();


    swipeRefreshLayout.setOnRefreshListener(this);

    // Configure the refreshing colors
    swipeRefreshLayout.setColorSchemeResources(android.R.color.holo_blue_bright,
            android.R.color.holo_green_light,
            android.R.color.holo_orange_light,
            android.R.color.holo_red_light);

    swipeRefreshLayout.post(new Runnable() {
                                @Override
                                public void run() {
                                    swipeRefreshLayout.setRefreshing(true);

                                    fetchAllNews();
                                    swipeRefreshLayout.setRefreshing(false);
                                }
                            }
    );

    //init native ads manager
    listNativeAdsManager = new NativeAdsManager(getActivity(),
            getString(R.string.test_facebook_unit_id),
            getResources().getInteger(R.integer.max_pull_ad_number));
    if (getString(R.string.test_ad_mode).equals("T")){
        AdSettings.addTestDevice(getString(R.string.test_device_id));
    }
    listNativeAdsManager.setListener(this);
    listNativeAdsManager.loadAds();
    return v;
}
 
开发者ID:aknkaplanoglu,项目名称:Sportmix,代码行数:42,代码来源:SabahFragment.java

示例7: onCreateView

import com.facebook.ads.AdSettings; //导入方法依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    v = inflater.inflate(R.layout.layout_ligtv_fragment, container, false);

    swipeRefreshLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_refresh_layout);
  /*  alertDialog=new SpotsDialog(getActivity(),R.style.Custom_Progress_Dialog);
    setCustomAlertDialog();*/
    // fillTheData();


    swipeRefreshLayout.setOnRefreshListener(this);

    // Configure the refreshing colors
    swipeRefreshLayout.setColorSchemeResources(android.R.color.holo_blue_bright,
            android.R.color.holo_green_light,
            android.R.color.holo_orange_light,
            android.R.color.holo_red_light);

    swipeRefreshLayout.post(new Runnable() {
                                @Override
                                public void run() {
                                    swipeRefreshLayout.setRefreshing(true);

                                    fetchAllNews();
                                    swipeRefreshLayout.setRefreshing(false);
                                }
                            }
    );

    //init native ads manager
    listNativeAdsManager = new NativeAdsManager(getActivity(),
            getString(R.string.test_facebook_unit_id),
            getResources().getInteger(R.integer.max_pull_ad_number));
    if (getString(R.string.test_ad_mode).equals("T")){
        AdSettings.addTestDevice(getString(R.string.test_device_id));
    }
    listNativeAdsManager.setListener(this);
    listNativeAdsManager.loadAds();
    return v;
}
 
开发者ID:aknkaplanoglu,项目名称:Sportmix,代码行数:42,代码来源:LigTvFragment.java

示例8: onCreateView

import com.facebook.ads.AdSettings; //导入方法依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    v = inflater.inflate(R.layout.layout_ntvspor_fragment, container, false);

    swipeRefreshLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_refresh_layout);
  /*  alertDialog=new SpotsDialog(getActivity(),R.style.Custom_Progress_Dialog);
    setCustomAlertDialog();*/
    // fillTheData();


    swipeRefreshLayout.setOnRefreshListener(this);

    // Configure the refreshing colors
    swipeRefreshLayout.setColorSchemeResources(android.R.color.holo_blue_bright,
            android.R.color.holo_green_light,
            android.R.color.holo_orange_light,
            android.R.color.holo_red_light);

    swipeRefreshLayout.post(new Runnable() {
                                @Override
                                public void run() {
                                    swipeRefreshLayout.setRefreshing(true);

                                    fetchAllNews();
                                    swipeRefreshLayout.setRefreshing(false);
                                }
                            }
    );

    //init native ads manager
    listNativeAdsManager = new NativeAdsManager(getActivity(),
            getString(R.string.test_facebook_unit_id),
            getResources().getInteger(R.integer.max_pull_ad_number));
    if (getString(R.string.test_ad_mode).equals("T")){
        AdSettings.addTestDevice(getString(R.string.test_device_id));
    }
    listNativeAdsManager.setListener(this);
    listNativeAdsManager.loadAds();
    return v;
}
 
开发者ID:aknkaplanoglu,项目名称:Sportmix,代码行数:42,代码来源:GoalComFragment.java

示例9: onCreateView

import com.facebook.ads.AdSettings; //导入方法依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    v = inflater.inflate(R.layout.layout_haberturk_fragment, container, false);

    swipeRefreshLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_refresh_layout);
  /*  alertDialog=new SpotsDialog(getActivity(),R.style.Custom_Progress_Dialog);
    setCustomAlertDialog();*/
    // fillTheData();


    swipeRefreshLayout.setOnRefreshListener(this);

    // Configure the refreshing colors
    swipeRefreshLayout.setColorSchemeResources(android.R.color.holo_blue_bright,
            android.R.color.holo_green_light,
            android.R.color.holo_orange_light,
            android.R.color.holo_red_light);

    swipeRefreshLayout.post(new Runnable() {
                                @Override
                                public void run() {
                                    swipeRefreshLayout.setRefreshing(true);

                                    fetchAllNews();
                                    swipeRefreshLayout.setRefreshing(false);
                                }
                            }
    );

    //init native ads manager
    listNativeAdsManager = new NativeAdsManager(getActivity(),
            getString(R.string.test_facebook_unit_id),
            getResources().getInteger(R.integer.max_pull_ad_number));
    if (getString(R.string.test_ad_mode).equals("T")){
        AdSettings.addTestDevice(getString(R.string.test_device_id));
    }
    listNativeAdsManager.setListener(this);
    listNativeAdsManager.loadAds();
    return v;
}
 
开发者ID:aknkaplanoglu,项目名称:Sportmix,代码行数:42,代码来源:HaberTurkFragment.java


注:本文中的com.facebook.ads.AdSettings.addTestDevice方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。