Skip to content

Commit

Permalink
增加bugly
Browse files Browse the repository at this point in the history
  • Loading branch information
KingsFish committed Jan 4, 2020
1 parent 7f3f439 commit ce3c9c9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ dependencies {
implementation 'androidx.browser:browser:1.0.0'
implementation "androidx.preference:preference:1.0.0"
implementation 'com.alibaba:fastjson:1.1.71.android'
implementation 'com.tencent.bugly:crashreport:latest.release'
}
4 changes: 4 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
<uses-permission android:name="android.permission.INTERNET" />
<!-- 检测网络状态变化权限 -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!-- 读写外存 下载文件需要 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<!-- bugly 统计需要获取该权限 -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />

<application
android:name=".App"
android:allowBackup="true"
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/java/me/yluo/ruisiapp/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import android.text.TextUtils;
import android.util.Log;

import com.tencent.bugly.crashreport.CrashReport;

import me.yluo.ruisiapp.checknet.NetworkReceiver;
import me.yluo.ruisiapp.database.MyDB;
import me.yluo.ruisiapp.database.SQLiteHelper;
Expand Down Expand Up @@ -52,6 +54,7 @@ public void onCreate() {

regReciever();

CrashReport.initCrashReport(getApplicationContext(), "04a96747f8", false);
}

@Override
Expand Down

0 comments on commit ce3c9c9

Please sign in to comment.