4
4
import android .preference .PreferenceManager ;
5
5
import androidx .annotation .Nullable ;
6
6
7
- import com .microsoft .appcenter .AppCenter ;
8
- import com .microsoft .appcenter .analytics .Analytics ;
9
- import com .microsoft .appcenter .crashes .Crashes ;
7
+ import com .flurry .android .FlurryAgent ;
10
8
import com .oasisfeng .condom .CondomContext ;
11
9
import com .orhanobut .logger .AndroidLogAdapter ;
12
10
import com .orhanobut .logger .FormatStrategy ;
26
24
import me .ghui .v2er .module .pay .ParseOrder ;
27
25
import me .ghui .v2er .module .pay .PayUtil ;
28
26
import me .ghui .v2er .network .APIService ;
29
- import me .ghui .v2er .util .V2er ;
27
+ import me .ghui .v2er .util .Flurry ;
30
28
import me .ghui .v2er .util .L ;
29
+ import me .ghui .v2er .util .UserUtils ;
31
30
32
31
/**
33
32
* Created by ghui on 05/03/2017.
@@ -52,7 +51,6 @@ private void init() {
52
51
sInstance = this ;
53
52
mAppComponent = DaggerAppComponent .builder ().appModule (new AppModule (sInstance ))
54
53
.build ();
55
- initAppCenter ();
56
54
rxjava ();
57
55
initLogger ();
58
56
PayUtil .checkIsGooglePro (false );
@@ -65,7 +63,8 @@ private void init() {
65
63
private void rxjava () {
66
64
RxJavaPlugins .setErrorHandler (e -> {
67
65
L .e ("globalHandler: " + e .getMessage ());
68
- V2er .capture ("globalHandler: " + e .getMessage ());
66
+ // V2er.capture("globalHandler: " + e.getMessage());
67
+ Flurry .capture ("globalHandler: " + e .getMessage ());
69
68
});
70
69
}
71
70
@@ -85,7 +84,7 @@ public boolean isLoggable(int priority, @Nullable String tag) {
85
84
}
86
85
87
86
private void initThirdPartySDK () {
88
- // if (BuildConfig.DEBUG) return ;
87
+ initFlurry () ;
89
88
initParseSDK ();
90
89
initWechat ();
91
90
}
@@ -99,9 +98,12 @@ private void initParseSDK() {
99
98
.build ());
100
99
}
101
100
102
- private void initAppCenter () {
103
- AppCenter .start (this , "86417784-dfd2-4d2e-9ed9-fccb88bb2b1f" ,
104
- Analytics .class , Crashes .class );
101
+ private void initFlurry () {
102
+ new FlurryAgent .Builder ()
103
+ .withLogEnabled (BuildConfig .DEBUG )
104
+ .withCaptureUncaughtExceptions (true )
105
+ .build (this , "4PZMS4HSZP3YNMBP8W4R" );
106
+ FlurryAgent .setUserId (UserUtils .getUserName ());
105
107
}
106
108
107
109
private void initWechat () {
0 commit comments