Commit b538dc43 authored by fallenstardust's avatar fallenstardust

全局初始化bugly,支持上传native crash log

parent f8008cbc
......@@ -20,18 +20,14 @@
<pre>
更新:
1.更新ygo内核;
2.新卡LVP3+VJ+YMAB;
3.更换自动更新下载源;
修复:
1.安卓10不能正确获得更新的问题;
2.安卓10的权限适配问题;
1.修复部分华为刘海屏手机点击偏移的问题;
</pre>
<h3 style="color:#ff0000">注意</h3>
<pre>
出现点击不准,不灵敏的情况
·华为手机进手机设置,隐藏顶部区域(不同华为有不同的叫法,都是隐藏状态栏)
·小米手机MIUI11选择功能菜单>设置>开启沉浸式画面
目前手头缺少这两品牌的多种机型,适配坑深难以一步到位
目前手头缺少多种机型,适配坑深难以一步到位
还请海涵。
</pre>
</body>
......
......@@ -4,14 +4,19 @@ package cn.garymb.ygomobile;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.widget.ImageView;
import androidx.appcompat.app.AppCompatDelegate;
import com.bumptech.glide.Glide;
import com.tencent.bugly.Bugly;
import com.tencent.bugly.beta.Beta;
import com.yuyh.library.imgsel.ISNav;
import com.yuyh.library.imgsel.common.ImageLoader;
import cn.garymb.ygomobile.lite.R;
import cn.garymb.ygomobile.utils.CrashHandler;
public class App extends GameApplication {
......@@ -30,6 +35,8 @@ public class App extends GameApplication {
}
//初始化图片选择器
initImgsel();
//初始化bugly
initBugly();
}
@Override
......@@ -140,4 +147,22 @@ public class App extends GameApplication {
}
});
}
public void initBugly() {
Beta.initDelay = 0;
Beta.showInterruptedStrategy = true;
Beta.largeIconId = R.drawable.ic_icon_round;
Beta.defaultBannerId = R.drawable.ic_icon_round;
Beta.strToastYourAreTheLatestVersion = this.getString(R.string.Already_Lastest);
Beta.strToastCheckingUpgrade = this.getString(R.string.Checking_Update);
Beta.upgradeDialogLayoutId = R.layout.dialog_upgrade;
ApplicationInfo appInfo = null;
try {
appInfo = this.getPackageManager().getApplicationInfo(getPackageName(), PackageManager.GET_META_DATA);
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
String msg = appInfo.metaData.getString("BUGLY_APPID");
Bugly.init(this, msg, true);
}
}
......@@ -34,6 +34,7 @@ import com.nightonke.boommenu.BoomButtons.TextOutsideCircleButton;
import com.nightonke.boommenu.BoomMenuButton;
import com.tencent.bugly.Bugly;
import com.tencent.bugly.beta.Beta;
import com.tencent.bugly.crashreport.CrashReport;
import com.tencent.smtt.sdk.QbSdk;
import com.tubb.smrv.SwipeMenuRecyclerView;
......@@ -123,8 +124,6 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
QbSdk.initX5Environment(this, cb);
//trpay
TrPay.getInstance(HomeActivity.this).initPaySdk("e1014da420ea4405898c01273d6731b6", "YGOMobile");
//初始化bugly
initBugly();
//check update
Beta.checkUpgrade(false, false);
//ServiceDuelAssistant
......@@ -493,24 +492,6 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
}
}
public void initBugly() {
Beta.initDelay = 0;
Beta.showInterruptedStrategy = true;
Beta.largeIconId = R.drawable.ic_icon_round;
Beta.defaultBannerId = R.drawable.ic_icon_round;
Beta.strToastYourAreTheLatestVersion = this.getString(R.string.Already_Lastest);
Beta.strToastCheckingUpgrade = this.getString(R.string.Checking_Update);
Beta.upgradeDialogLayoutId = R.layout.dialog_upgrade;
ApplicationInfo appInfo = null;
try {
appInfo = this.getPackageManager().getApplicationInfo(getPackageName(), PackageManager.GET_META_DATA);
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
String msg = appInfo.metaData.getString("BUGLY_APPID");
Bugly.init(this, msg, true);
}
public boolean joinQQGroup(String key) {
Intent intent = new Intent();
intent.setData(Uri.parse("mqqopensdkapi://bizAgent/qm/qr?url=http%3A%2F%2Fqm.qq.com%2Fcgi-bin%2Fqm%2Fqr%3Ffrom%3Dapp%26p%3Dandroid%26k%3D" + key));
......
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