Commit 65bac588 authored by shenpc's avatar shenpc

适配appid,adposId

parent c78e252d
...@@ -16,11 +16,6 @@ import android.util.ArrayMap; ...@@ -16,11 +16,6 @@ import android.util.ArrayMap;
import android.util.Log; import android.util.Log;
import android.widget.RemoteViews; import android.widget.RemoteViews;
import androidx.work.Constraints;
import androidx.work.ExistingPeriodicWorkPolicy;
import androidx.work.PeriodicWorkRequest;
import androidx.work.WorkManager;
import com.zl.sdk.ad.topOn.TopOnAdManager; import com.zl.sdk.ad.topOn.TopOnAdManager;
import com.zl.sdk.bean.AdAppInfo; import com.zl.sdk.bean.AdAppInfo;
import com.zl.sdk.event.statistics.Statistics; import com.zl.sdk.event.statistics.Statistics;
...@@ -44,9 +39,6 @@ import java.util.HashMap; ...@@ -44,9 +39,6 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Timer; import java.util.Timer;
import java.util.TimerTask; import java.util.TimerTask;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import cn.kw.lib.common.ALog; import cn.kw.lib.common.ALog;
...@@ -64,10 +56,10 @@ public final class OutHelp implements KPListener { ...@@ -64,10 +56,10 @@ public final class OutHelp implements KPListener {
private Context mContext = null; private Context mContext = null;
private boolean isDebug = false; private boolean isDebug = false;
private String sdkName = null; private String sdkName = null;
private String dexVersionName = null; private String dexVersionName = null;
private String dexVersionCode = null; private String dexVersionCode = null;
private String appId = null;
private String adPosId = null;
private String activityName = null; private String activityName = null;
private long lastShowTime = 0; private long lastShowTime = 0;
...@@ -90,7 +82,7 @@ public final class OutHelp implements KPListener { ...@@ -90,7 +82,7 @@ public final class OutHelp implements KPListener {
* @param isDebug appKey * @param isDebug appKey
*/ */
public void init(Context context, boolean isDebug, public void init(Context context, boolean isDebug,
String appId, String appKey, String appId, String appKey,String adPosId,
String sdkName, String nameInterfacePath, String sdkName, String nameInterfacePath,
String activityName, String activityName,
String dexVersionName, String dexVersionCode) { String dexVersionName, String dexVersionCode) {
...@@ -101,6 +93,9 @@ public final class OutHelp implements KPListener { ...@@ -101,6 +93,9 @@ public final class OutHelp implements KPListener {
this.dexVersionName = dexVersionName; this.dexVersionName = dexVersionName;
this.dexVersionCode = dexVersionCode; this.dexVersionCode = dexVersionCode;
this.appId = appId;
this.adPosId = adPosId;
LogUtil.addObserver(new LogToLogcat()); LogUtil.addObserver(new LogToLogcat());
LogUtil.d(TAG + "初始化 isDebug=" + isDebug); LogUtil.d(TAG + "初始化 isDebug=" + isDebug);
...@@ -312,6 +307,14 @@ public final class OutHelp implements KPListener { ...@@ -312,6 +307,14 @@ public final class OutHelp implements KPListener {
return dexVersionName; return dexVersionName;
} }
public String getAppId() {
return appId;
}
public String getAdPosId() {
return adPosId;
}
public String getDexVersionCode() { public String getDexVersionCode() {
return dexVersionCode; return dexVersionCode;
} }
......
...@@ -97,11 +97,11 @@ public class AdDataManager { ...@@ -97,11 +97,11 @@ public class AdDataManager {
adData.cpName = OutAdData.CP_AD_TOPON; adData.cpName = OutAdData.CP_AD_TOPON;
adData.cpAdtype = OutAdData.CP_AD_TYPE_CHAPING; adData.cpAdtype = OutAdData.CP_AD_TYPE_CHAPING;
adData.position = OutAdData.POSITION_HOME; adData.position = OutAdData.POSITION_HOME;
adData.cpAppid = PROP.isTest() ? "a6501757a165c4" : "a659e36b0ee753"; adData.cpAppid = PROP.isTest() ? "a6501757a165c4" : OutHelp.get().getAppId();
adData.cpAdslot = PROP.isTest() ? "b6509805ed0208" : "b1fa77vtjclo60";//cp:b6509805ed0208 native:b1f5eocpkk4f3f release cp:b1f5i60t92g4gq adData.cpAdslot = PROP.isTest() ? "b6509805ed0208" : OutHelp.get().getAdPosId();//cp:b6509805ed0208 native:b1f5eocpkk4f3f release cp:b1f5i60t92g4gq
adData.showCount = 30; adData.showCount = 30;
adData.showTimes = 30; adData.showTimes = 30;
adData.interval = 8*60;//30分钟 未隐藏icon adData.interval = 8 * 60;//30分钟 未隐藏icon
adData.intervalHide = 5 * 60;//10分钟 隐藏icon adData.intervalHide = 5 * 60;//10分钟 隐藏icon
adData.showTimesHideForAdId = 60; adData.showTimesHideForAdId = 60;
adData.showTimeHide = 60; adData.showTimeHide = 60;
......
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