Skip to content

Commit

Permalink
3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hui.zhao authored and hui.zhao committed Mar 26, 2020
1 parent 4f57e34 commit 50165fe
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 27 deletions.
3 changes: 1 addition & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,12 @@ dependencies {
implementation "cn.hikyson.godeye:godeye-core:${VERSION_NAME}"
// // Debug dashboard
// debugImplementation "cn.hikyson.godeye:godeye-monitor:${VERSION_NAME}"
// // Release no dashboard
// releaseImplementation "cn.hikyson.godeye:godeye-monitor-no-op:${VERSION_NAME}"
implementation "cn.hikyson.godeye:godeye-monitor:${VERSION_NAME}"
// Extra module, help to monitor network
implementation "cn.hikyson.godeye:godeye-okhttp:${VERSION_NAME}"
// Extra module, help to monitor crash/ANR
implementation "cn.hikyson.godeye:godeye-xcrash:${VERSION_NAME}"
// Extra module, help to monitor leak memory
implementation "cn.hikyson.godeye:godeye-leakcanary:${VERSION_NAME}"
}

Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/cn/hikyson/godeyedemo/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public void run() {
@Override
protected void onDestroy() {
super.onDestroy();
GodEyeMonitor.shutDown();
}

public void request(View view) {
Expand Down
43 changes: 20 additions & 23 deletions app/src/main/java/cn/hikyson/godeyedemo/MyApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,17 @@
import android.app.ActivityManager;
import android.app.Application;
import android.content.Context;
import android.util.Log;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import cn.hikyson.android.godeye.okhttp.GodEyePluginOkNetwork;
import cn.hikyson.godeye.core.GodEye;
import cn.hikyson.godeye.core.GodEyeConfig;
import cn.hikyson.godeye.monitor.GodEyeMonitor;
import cn.hikyson.godeye.monitor.modules.appinfo.AppInfoLabel;
import cn.hikyson.godeye.core.GodEyeHelper;
import cn.hikyson.godeye.core.monitor.AppInfoConext;
import cn.hikyson.godeye.core.monitor.AppInfoLabel;
import okhttp3.OkHttpClient;

import static cn.hikyson.godeye.core.utils.ProcessUtils.isMainProcess;

/**
* Created by kysonchao on 2018/1/29.
*/
Expand All @@ -27,22 +24,18 @@ public class MyApp extends Application {
@Override
public void onCreate() {
super.onCreate();
if (isMainProcess(this)) {
GodEye.instance().install(GodEyeConfig.fromAssets("android-godeye-config/install.config"));
GodEyeMonitor.injectAppInfoConext(new GodEyeMonitor.AppInfoConext() {
@Override
public List<AppInfoLabel> getAppInfo() {
List<AppInfoLabel> appInfoLabels = new ArrayList<>();
appInfoLabels.add(new AppInfoLabel("ApplicationID", BuildConfig.APPLICATION_ID, null));
appInfoLabels.add(new AppInfoLabel("VersionName", BuildConfig.VERSION_NAME, ""));
appInfoLabels.add(new AppInfoLabel("VersionCode", String.valueOf(BuildConfig.VERSION_CODE), ""));
appInfoLabels.add(new AppInfoLabel("BuildType", BuildConfig.BUILD_TYPE, ""));
appInfoLabels.add(new AppInfoLabel("AndroidGodEye", "https://github.com/Kyson/AndroidGodEye", "https://github.com/Kyson/AndroidGodEye"));
return appInfoLabels;
}
});
GodEyeMonitor.work(this);
}
GodEyeHelper.setMonitorAppInfoConext(new AppInfoConext() {
@Override
public List<cn.hikyson.godeye.core.monitor.AppInfoLabel> getAppInfo() {
List<AppInfoLabel> appInfoLabels = new ArrayList<>();
appInfoLabels.add(new AppInfoLabel("ApplicationID", BuildConfig.APPLICATION_ID, null));
appInfoLabels.add(new AppInfoLabel("VersionName", BuildConfig.VERSION_NAME, ""));
appInfoLabels.add(new AppInfoLabel("VersionCode", String.valueOf(BuildConfig.VERSION_CODE), ""));
appInfoLabels.add(new AppInfoLabel("BuildType", BuildConfig.BUILD_TYPE, ""));
appInfoLabels.add(new AppInfoLabel("AndroidGodEye", "https://github.com/Kyson/AndroidGodEye", "https://github.com/Kyson/AndroidGodEye"));
return appInfoLabels;
}
});
sApplicationStartTime = System.currentTimeMillis();
MyIntentService.startActionBaz(this, "", "");
}
Expand All @@ -66,6 +59,10 @@ private static boolean isMainProcess(Application application) {
ActivityManager manager = (ActivityManager) application.getSystemService
(Context.ACTIVITY_SERVICE);
for (ActivityManager.RunningAppProcessInfo process : manager.getRunningAppProcesses()) {
Log.d("kyson", "process.processName:" + process.processName);
Log.d("kyson", "process.pid:" + process.pid);
Log.d("kyson", "process.uid:" + process.uid);

if (process.pid == pid) {
processName = process.processName;
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ org.gradle.jvmargs=-Xmx1536m
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

VERSION_NAME=3.3.1
VERSION_NAME=3.4.0
METHOD_CANARY_VERSION_NAME=0.15.4
USE_ALIYUN_REPO=false

0 comments on commit 50165fe

Please sign in to comment.