本文整理汇总了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;未经允许,请勿转载。 |
请发表评论