Commit 896d02b4 authored by bixing's avatar bixing

update

parent dc43ebc1
......@@ -52,6 +52,9 @@ public class PictureApplication extends Application implements Application.Activ
@OnLifecycleEvent(Lifecycle.Event.ON_START)
protected void onMoveToForeground() {
// Show the ad (if available) when the app moves to foreground.
if (init == 0) {
return;
}
TopOnAppOpenAdManager.getInstance().showAdIfAvailable(currentActivity);
}
......
......@@ -34,6 +34,8 @@ public class TopOnAppOpenAdManager {
*/
private long loadTime = 0;
private static final int init = 0;
/**
* Constructor.
*/
......@@ -53,6 +55,9 @@ public class TopOnAppOpenAdManager {
* Load an ad.
*/
public void loadAd() {
if (init == 0) {
return;
}
// Do not load ad if there is an unused ad or one is already loading.
if (isLoadingAd || isAdAvailable()) {
return;
......
......@@ -11,8 +11,13 @@ public class TopOnItAdManager {
private static final String IT_AD_UNIT_ID = "b6509805ed0208";
private static ATInterstitial itAd = null;
private static OnItAdListener listener = null;
private static final int init = 0;
public static void loadItAd() {
if (init == 0) {
return;
}
if (itAd != null) {
itAd.load();
return;
......
......@@ -23,6 +23,8 @@ public class TopOnManager {
// Field from default config.
public static final String TOPON_APP_KEY = "a53892abacdd1aebf0ea1d927ab0f0d88";
private static final int init = 0;
public void initSDK(Context context) {
//SDK日志功能,集成测试阶段建议开启,上线前必须关闭
// ATSDK.setNetworkLogDebug(true);
......@@ -35,6 +37,9 @@ public class TopOnManager {
// "596795a7-b851-4514-bd7e-8561d641a968",
// new ATDebuggerConfig.Builder(Pangle_NETWORK).build());
if (init == 0) {
return;
}
ATSDK.init(context, TOPON_APP_ID, TOPON_APP_KEY);
//SDK版本
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment