Commit 99da0806 authored by fallenstardust's avatar fallenstardust

分渠道填写APP_ID

改在线依赖
parent 8fc1ad5f
......@@ -22,15 +22,15 @@ android {
}
productFlavors {
cn {
manifestPlaceholders = [PGYER_APPID: "5be72b17bccbc9898012d35f713c57ff"]
manifestPlaceholders = [APP_ID: "0b6f110306"]
}
en {
applicationIdSuffix ".EN"
manifestPlaceholders = [PGYER_APPID: "c94918f2b9ca85a0b77567ca53218121"]
manifestPlaceholders = [APP_ID: "9c66525dfa"]
}
ko {
applicationIdSuffix ".KO"
manifestPlaceholders = [PGYER_APPID: "885b0ff6e389b741aff1d62011f9a8ac"]
manifestPlaceholders = [APP_ID: "0488398d8a"]
}
}
buildTypes {
......@@ -115,6 +115,7 @@ dependencies {
//跨进程SharedPreferencesPlus工具
implementation 'com.github.zhangliangming:PreferencesProvider:v1.3'
//Tencent bugly
implementation(name: 'bugly_crashreport_upgrade-1.4.2', ext: 'aar')
implementation 'com.tencent.bugly:crashreport_upgrade:latest.release'
implementation 'com.tencent.bugly:nativecrashreport:latest.release'
}
......@@ -190,8 +190,11 @@
android:theme="@android:style/Theme.Translucent" />
<meta-data
android:name="PGYER_APPID"
android:value="${PGYER_APPID}" />
android:name="BUGLY_APPID"
android:value="${APP_ID}" />
<meta-data
android:name="BUGLY_ENABLE_DEBUG"
android:value="true" />
<!-- 为防止Service被系统回收,可以尝试通过提高服务的优先级解决,1000是最高优先级,数字越小,优先级越低 -->
<!--android:priority="1000"-->
<service
......
package cn.garymb.ygomobile.ui.home;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
......@@ -41,7 +41,6 @@ import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.io.File;
import java.io.IOException;
import java.util.List;
......@@ -125,12 +124,18 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
//trpay
TrPay.getInstance(HomeActivity.this).initPaySdk("e1014da420ea4405898c01273d6731b6", "YGOMobile");
//初始化bugly
Bugly.init(getApplicationContext(), "0b6f110306", true);
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);
//check update
Beta.checkUpgrade(false,true);
Beta.checkUpgrade(false, false);
//ServiceDuelAssistant
startDuelService(this);
//萌卡
StartMycard();
checkNotch();
......
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