Commit e97bf6ee authored by leichao.gao's avatar leichao.gao

add log

parent 775ea5be
......@@ -71,16 +71,17 @@ public class AdDisplayUtils {
public boolean shouldShowAd(String ad_unit) {
boolean s = shouldDisplayAd() && shouldIncrementClickCount() && shouldIncrementRequestFailAd();
if (!s) {
LogEx.INSTANCE.logDebug("glc", "!shouldShowAd", false);
JSONObject obj2 = new JSONObject();
try {
obj2.put("reason", "no ad");
obj2.put("ad_unit", ad_unit);
EventUtils.INSTANCE.event("ad_show_error", null,obj2,false);
EventUtils.INSTANCE.event("ad_show_error", null, obj2, false);
} catch (JSONException e) {
}
}
return s;
}
......
......@@ -75,6 +75,7 @@ object AdMaxEvent {
obj.put("latency", ad?.requestLatencyMillis)
obj.put("valueMicros", ad?.revenue)
obj.put("from",activity.javaClass.simpleName)
LogEx.logDebug("glc","from: "+activity.javaClass.simpleName)
if(!adUnit.equals("nativeAd")){
EventUtils.event("ad_show", ext = obj)
}else{
......
......@@ -217,7 +217,7 @@ object NotificationUtil {
fun sendNotification(context: Context) {
val currentNum = AppPreferences.getInstance().getInt("showNotificationCount_" + AdDisplayUtils.getInstance().getCurrentDate(), 0)
val maxNum = AppPreferences.getInstance().getString("maxShowNotificationCount", "100").toIntOrNull()?:100
val maxNum = AppPreferences.getInstance().getString("maxShowNotificationCount", "156").toIntOrNull()?:156
if (currentNum >= maxNum) {
LogEx.logDebug("glc","currentNum >= maxNum")
return
......
......@@ -30,7 +30,9 @@ object InstallHelps {
if (listOf("gclid", "facebook", "instagram").all { !installInfo.contains(it, true) }) {
//自然用户
AppPreferences.getInstance().put("install_source", "origin")
LogEx.logDebug("glc","origin user")
} else {
LogEx.logDebug("glc","channel user")
//渠道用户
AppPreferences.getInstance().put("install_source", "channel")
}
......
......@@ -99,6 +99,7 @@ object NewComUtils {
AdDisplayUtils.getInstance().maxAdRequestFailCount =
AppPreferences.getInstance().getString("adRequestFailCount", "20").toInt()
}
}
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