update umeng sdk
This commit is contained in:
@@ -183,6 +183,10 @@ android {
|
|||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = "1.8"
|
||||||
|
}
|
||||||
|
|
||||||
productFlavors {
|
productFlavors {
|
||||||
accompany {
|
accompany {
|
||||||
dimension 'default'
|
dimension 'default'
|
||||||
|
@@ -15,7 +15,7 @@ buildscript {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven {url 'http://developer.huawei.com/repo/'}
|
maven {url 'http://developer.huawei.com/repo/'}
|
||||||
maven { url "http://mvn.mob.com/android" }
|
maven { url "http://mvn.mob.com/android" }
|
||||||
maven { url 'https://dl.bintray.com/umsdk/release' }
|
maven { url 'https://repo1.maven.org/maven2/' }
|
||||||
maven { url 'https://dl.bintray.com/linkedme2016/lkme-deeplinks' }
|
maven { url 'https://dl.bintray.com/linkedme2016/lkme-deeplinks' }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ allprojects {
|
|||||||
maven { url 'https://maven.aliyun.com/repository/public' }
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
||||||
maven { url 'https://jitpack.io' }
|
maven { url 'https://jitpack.io' }
|
||||||
maven { url "http://mvn.mob.com/android" }
|
maven { url "http://mvn.mob.com/android" }
|
||||||
maven { url 'https://dl.bintray.com/umsdk/release' }
|
maven { url 'https://repo1.maven.org/maven2/' }
|
||||||
maven { url 'https://dl.bintray.com/linkedme2016/lkme-deeplinks' }
|
maven { url 'https://dl.bintray.com/linkedme2016/lkme-deeplinks' }
|
||||||
maven { url 'http://developer.huawei.com/repo/' }
|
maven { url 'http://developer.huawei.com/repo/' }
|
||||||
}
|
}
|
||||||
|
@@ -64,10 +64,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def loggerVersion = "2.2.0"
|
def loggerVersion = "2.2.0"
|
||||||
def BaiduMtjVersion = "3.8.2.1"
|
|
||||||
def Lombok = "1.16.20"
|
def Lombok = "1.16.20"
|
||||||
def umeng_common = "2.2.5"
|
|
||||||
def umeng_analytics = "8.1.6"
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
@@ -75,11 +72,10 @@ dependencies {
|
|||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
||||||
|
|
||||||
|
|
||||||
api "com.orhanobut:logger:${loggerVersion}"
|
api "com.orhanobut:logger:${loggerVersion}"
|
||||||
|
|
||||||
// 百度统计
|
api 'com.umeng.umsdk:common:9.3.8'// 必选
|
||||||
api "com.baidu.mobstat:mtj-sdk:${BaiduMtjVersion}"
|
api 'com.umeng.umsdk:asms:1.2.2'// 必选
|
||||||
|
|
||||||
compileOnly "org.projectlombok:lombok:${Lombok}"
|
compileOnly "org.projectlombok:lombok:${Lombok}"
|
||||||
annotationProcessor "org.projectlombok:lombok:${Lombok}"
|
annotationProcessor "org.projectlombok:lombok:${Lombok}"
|
||||||
|
Binary file not shown.
Binary file not shown.
@@ -1,9 +1,9 @@
|
|||||||
package com.yizhuan.xchat_android_core.statistic;
|
package com.yizhuan.xchat_android_core.statistic;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import androidx.annotation.Keep;
|
import androidx.annotation.Keep;
|
||||||
|
|
||||||
import com.baidu.mobstat.StatService;
|
|
||||||
import com.umeng.analytics.MobclickAgent;
|
import com.umeng.analytics.MobclickAgent;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -18,37 +18,26 @@ import java.util.Map;
|
|||||||
public class StatisticModel {
|
public class StatisticModel {
|
||||||
|
|
||||||
void onEventEnd(Context context, String eventId, String eventLabel, Map<String, String> arguments) {
|
void onEventEnd(Context context, String eventId, String eventLabel, Map<String, String> arguments) {
|
||||||
if (arguments == null) {
|
MobclickAgent.onPageEnd(eventId);
|
||||||
StatService.onEventEnd(context, eventId, eventLabel);
|
|
||||||
MobclickAgent.onPageEnd(eventId);
|
|
||||||
} else {
|
|
||||||
StatService.onEventEnd(context, eventId, eventLabel, arguments);
|
|
||||||
MobclickAgent.onPageEnd(eventId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void onEventStart(Context context, String eventId, String eventLabel) {
|
void onEventStart(Context context, String eventId, String eventLabel) {
|
||||||
StatService.onEventStart(context, eventId, eventLabel);
|
|
||||||
MobclickAgent.onPageStart(eventId);
|
MobclickAgent.onPageStart(eventId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void onEvent(Context context, String eventId, String eventLabel, Map<String, String> arguments) {
|
void onEvent(Context context, String eventId, String eventLabel, Map<String, String> arguments) {
|
||||||
if (arguments != null) {
|
if (arguments != null) {
|
||||||
StatService.onEvent(context, eventId, eventLabel, 1, arguments);
|
|
||||||
MobclickAgent.onEvent(context, eventId, arguments);
|
MobclickAgent.onEvent(context, eventId, arguments);
|
||||||
} else {
|
} else {
|
||||||
StatService.onEvent(context, eventId, eventLabel);
|
|
||||||
MobclickAgent.onEvent(context, eventId, eventLabel);
|
MobclickAgent.onEvent(context, eventId, eventLabel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void onResume(Context context) {
|
void onResume(Context context) {
|
||||||
StatService.onResume(context);
|
|
||||||
MobclickAgent.onResume(context);
|
MobclickAgent.onResume(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
void onPause(Context context) {
|
void onPause(Context context) {
|
||||||
StatService.onPause(context);
|
|
||||||
MobclickAgent.onPause(context);
|
MobclickAgent.onPause(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,7 +48,6 @@ public class StatisticModel {
|
|||||||
* @param pageName 页面名称
|
* @param pageName 页面名称
|
||||||
*/
|
*/
|
||||||
void onPageStart(Context context, String pageName) {
|
void onPageStart(Context context, String pageName) {
|
||||||
StatService.onPageStart(context, pageName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -69,7 +57,6 @@ public class StatisticModel {
|
|||||||
* @param pageName 页面名称
|
* @param pageName 页面名称
|
||||||
*/
|
*/
|
||||||
void onPageEnd(Context context, String pageName) {
|
void onPageEnd(Context context, String pageName) {
|
||||||
StatService.onPageEnd(context, pageName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user