本文整理汇总了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));
}
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}