• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java CBLocation类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.chartboost.sdk.CBLocation的典型用法代码示例。如果您正苦于以下问题:Java CBLocation类的具体用法?Java CBLocation怎么用?Java CBLocation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CBLocation类属于com.chartboost.sdk包,在下文中一共展示了CBLocation类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: preloadAds

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
private void preloadAds() {
	if (!Chartboost.hasInterstitial(CBLocation.LOCATION_DEFAULT)) {
		Chartboost.cacheInterstitial(CBLocation.LOCATION_DEFAULT);
	}

	if (!Chartboost.hasInterstitial(CBLocation.LOCATION_GAME_SCREEN)) {
		Chartboost.cacheInterstitial(CBLocation.LOCATION_GAME_SCREEN);
	}

	if (!Chartboost.hasInterstitial(CBLocation.LOCATION_GAMEOVER)) {
		Chartboost.cacheInterstitial(CBLocation.LOCATION_GAMEOVER);
	}

	if (!Chartboost.hasRewardedVideo(CBLocation.LOCATION_DEFAULT)) {
		Chartboost.cacheRewardedVideo(CBLocation.LOCATION_DEFAULT);
	}
}
 
开发者ID:FrogSquare,项目名称:GodotAds,代码行数:18,代码来源:GDChartboost.java


示例2: requestAd

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
/**
 * Called by the AppNexus SDK to load an interstitial ad from Chartboost
 *
 * @param mIC       A controller through which the adapter must send events to the AppNexus SDK.
 * @param activity  The activity that the app launch interstitial ad from.
 * @param parameter An optional opaque string passed from the Ad Network Manager, this can be used
 *                  to define SDK-specific parameters such as additional targeting information.
 *                  The encoding of the contents of this string are entirely up to the implementation
 *                  of the third-party SDK adaptor.
 * @param uid       The network ID for this ad call.  This ID is opaque to the AppNexus SDK; the
 *                  ID's contents and their encoding are up to the implementation of the
 * @param tp        Targeting parameters passed from AN SDK. Important: Please pass in the location
 *                  by setting the customKeywords in the InterstitialAdView using key
 *                  ChartboostSetting.KEY_CHARTBOOST_LOCATION.
 */
@Override
public void requestAd(MediatedInterstitialAdViewController mIC, Activity activity, String parameter,
                      String uid, TargetingParameters tp) {
    weakActivity = new WeakReference<Activity>(activity);
    Chartboost.setAutoCacheAds(false);
    if (tp != null && tp.getCustomKeywords() != null) {
        for (Pair<String, String> p : tp.getCustomKeywords()) {
            if (p.first == ChartboostSettings.KEY_CHARTBOOST_LOCATION) {
                if (!StringUtil.isEmpty(p.second)) {
                    location = p.second;
                }
            }
        }
    }
    if (StringUtil.isEmpty(location)) {
        Clog.w(Clog.mediationLogTag, "Chartboost location was not passed in, using Default.");
        location = CBLocation.LOCATION_DEFAULT;
    }
    listener = new ChartboostListener(location, mIC);
    ChartboostDelegateBridge.getInstance().cacheInterstitialWithListener(location, listener);
}
 
开发者ID:appnexus,项目名称:mobile-sdk-android,代码行数:37,代码来源:ChartboostInterstitial.java


示例3: show_interstitial_ad

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
public void show_interstitial_ad() {
	activity.runOnUiThread(new Runnable() {
		public void run() {
			if (Chartboost.hasInterstitial(CBLocation.LOCATION_DEFAULT)) {
				Chartboost.showInterstitial(CBLocation.LOCATION_DEFAULT);
			}

			Chartboost.cacheInterstitial(CBLocation.LOCATION_DEFAULT);
		}
	});
}
 
开发者ID:FrogSquare,项目名称:GodotAds,代码行数:12,代码来源:GDChartboost.java


示例4: show_rewarded_video

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
public void show_rewarded_video() {
	activity.runOnUiThread(new Runnable() {
		public void run() {
			if (Chartboost.hasRewardedVideo(CBLocation.LOCATION_DEFAULT)) {
				Chartboost.showRewardedVideo(CBLocation.LOCATION_DEFAULT);
			}

			Chartboost.cacheRewardedVideo(CBLocation.LOCATION_DEFAULT);
		}
	});
}
 
开发者ID:FrogSquare,项目名称:GodotAds,代码行数:12,代码来源:GDChartboost.java


示例5: has_interstitial

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
public boolean has_interstitial() {
    boolean hasInterstitial = false;
    if(initialized) {
        hasInterstitial = Chartboost.hasInterstitial(CBLocation.LOCATION_DEFAULT);
    }
    return hasInterstitial;
}
 
开发者ID:beocat,项目名称:mamau_chartboost,代码行数:8,代码来源:MamauChartboost.java


示例6: has_more_apps

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
public boolean has_more_apps() {
    boolean hasApps = false;
    if(initialized) {
        hasApps = Chartboost.hasMoreApps(CBLocation.LOCATION_DEFAULT);
    }
    return hasApps;
}
 
开发者ID:beocat,项目名称:mamau_chartboost,代码行数:8,代码来源:MamauChartboost.java


示例7: has_reward_video

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
public boolean has_reward_video() {
    boolean hasVideo = false;
    if(initialized) {
        hasVideo = Chartboost.hasRewardedVideo(CBLocation.LOCATION_DEFAULT);
    }
    return hasVideo;
}
 
开发者ID:beocat,项目名称:mamau_chartboost,代码行数:8,代码来源:MamauChartboost.java


示例8: createChartboostParams

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
/**
 * This method will create and return a new {@link ChartboostParams} object populated with the
 * parameters obtained from the server parameters and network extras bundles.
 *
 * @param serverParameters a {@link Bundle} containing server parameters used to initialize
 *                         Chartboost.
 * @param networkExtras    a {@link Bundle} containing optional information to be used by the
 *                         adapter.
 * @return a {@link ChartboostParams} object populated with the params obtained from the
 * bundles provided.
 */
private ChartboostParams createChartboostParams(Bundle serverParameters, Bundle networkExtras) {
    ChartboostParams params = new ChartboostParams();
    String appId = serverParameters.getString(KEY_APP_ID);
    String appSignature = serverParameters.getString(KEY_APP_SIGNATURE);
    if (appId != null && appSignature != null) {
        params.setAppId(appId.trim());
        params.setAppSignature(appSignature.trim());
    }

    String adLocation = serverParameters.getString(KEY_AD_LOCATION);
    if (!isValidParam(adLocation)) {
        // Ad Location is empty, log a warning and use the default location.
        Log.w(TAG, String.format("Chartboost ad location is empty, defaulting to %s. Please "
                        + "set the Ad Location parameter in your AdMob console.",
                CBLocation.LOCATION_DEFAULT));
        adLocation = CBLocation.LOCATION_DEFAULT;
    }
    params.setLocation(adLocation.trim());

    if (networkExtras != null) {
        if (networkExtras.containsKey(ChartboostExtrasBundleBuilder.KEY_FRAMEWORK)
                && networkExtras.containsKey(
                ChartboostExtrasBundleBuilder.KEY_FRAMEWORK_VERSION)) {
            mChartboostParams.setFramework((CBFramework) networkExtras.getSerializable(
                    ChartboostExtrasBundleBuilder.KEY_FRAMEWORK));
            mChartboostParams.setFrameworkVersion(
                    networkExtras.getString(
                            ChartboostExtrasBundleBuilder.KEY_FRAMEWORK_VERSION));
        }
    }
    return params;
}
 
开发者ID:googleads,项目名称:googleads-mobile-android-mediation,代码行数:44,代码来源:ChartboostAdapter.java


示例9: executeRequestInterstitialAd

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
private PluginResult executeRequestInterstitialAd (JSONObject options, CallbackContext callbackContext) {
 setOptions (options);
 final CallbackContext delayCallback = callbackContext;
 cordova.getActivity().runOnUiThread (new Runnable() {
  @Override public void run () {
   Chartboost.cacheInterstitial (CBLocation.LOCATION_DEFAULT);
   //Chartboost.cacheRewardedVideo (CBLocation.LOCATION_GAMEOVER);
   delayCallback.success ();
  }
 });
 return null;
}
 
开发者ID:agamemnus,项目名称:cordova-plugin-chartboost,代码行数:13,代码来源:ChartboostPlugin.java


示例10: executeShowInterstitialAd

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
private PluginResult executeShowInterstitialAd (final boolean show, final CallbackContext callbackContext) {
 cordova.getActivity().runOnUiThread (new Runnable () {
  @Override public void run () {
   Chartboost.showInterstitial  (CBLocation.LOCATION_DEFAULT);
   // Chartboost.showRewardedVideo (CBLocation.LOCATION_GAMEOVER);
   if (callbackContext != null) callbackContext.success ();
  }
 });
 return null;
}
 
开发者ID:agamemnus,项目名称:cordova-plugin-chartboost,代码行数:11,代码来源:ChartboostPlugin.java


示例11: cache_interstitial

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
public void cache_interstitial() {
    if(initialized) {
        Chartboost.cacheInterstitial(CBLocation.LOCATION_DEFAULT);
    }
}
 
开发者ID:beocat,项目名称:mamau_chartboost,代码行数:6,代码来源:MamauChartboost.java


示例12: show_interstitial

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
public void show_interstitial() {
    if(initialized) {
        Chartboost.showInterstitial(CBLocation.LOCATION_DEFAULT);
    }
}
 
开发者ID:beocat,项目名称:mamau_chartboost,代码行数:6,代码来源:MamauChartboost.java


示例13: cache_more_apps

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
public void cache_more_apps() {
    if(initialized) {
        Chartboost.cacheMoreApps(CBLocation.LOCATION_DEFAULT);
    }
}
 
开发者ID:beocat,项目名称:mamau_chartboost,代码行数:6,代码来源:MamauChartboost.java


示例14: show_more_apps

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
public void show_more_apps() {
    if(initialized) {
        Chartboost.showMoreApps(CBLocation.LOCATION_DEFAULT);
    }
}
 
开发者ID:beocat,项目名称:mamau_chartboost,代码行数:6,代码来源:MamauChartboost.java


示例15: cache_reward_video

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
public void cache_reward_video() {
    if(initialized) {
        Chartboost.cacheRewardedVideo(CBLocation.LOCATION_DEFAULT);
    }
}
 
开发者ID:beocat,项目名称:mamau_chartboost,代码行数:6,代码来源:MamauChartboost.java


示例16: show_reward_video

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
public void show_reward_video() {
    if(initialized) {
        Chartboost.showRewardedVideo(CBLocation.LOCATION_DEFAULT);
    }
}
 
开发者ID:beocat,项目名称:mamau_chartboost,代码行数:6,代码来源:MamauChartboost.java


示例17: ChartboostParams

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
/**
 * Default constructor, sets a default value for {@link #cbLocation}.
 */
public ChartboostParams() {
    this.cbLocation = CBLocation.LOCATION_DEFAULT;
}
 
开发者ID:googleads,项目名称:googleads-mobile-android-mediation,代码行数:7,代码来源:ChartboostParams.java


示例18: hasMoreApps

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
@Override
public boolean hasMoreApps() {
    return Chartboost.hasMoreApps(CBLocation.LOCATION_DEFAULT);
}
 
开发者ID:UnderwaterApps,项目名称:submarine,代码行数:5,代码来源:AndroidChartBoost.java


示例19: showMoreApps

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
@Override
public void showMoreApps() {
    Chartboost.showMoreApps(CBLocation.LOCATION_DEFAULT);
}
 
开发者ID:UnderwaterApps,项目名称:submarine,代码行数:5,代码来源:AndroidChartBoost.java


示例20: cacheMoreApps

import com.chartboost.sdk.CBLocation; //导入依赖的package包/类
@Override
public void cacheMoreApps() {
    Chartboost.cacheMoreApps(CBLocation.LOCATION_DEFAULT);
}
 
开发者ID:UnderwaterApps,项目名称:submarine,代码行数:5,代码来源:AndroidChartBoost.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java UUIDGenerator类代码示例发布时间:2022-05-23
下一篇:
Java CstNat类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap