feat(common): 添加主从应用判断逻辑
- 在 GlobalData 中添加 isMaster 属性,用于判断是否为主应用 - 修改 ServiceLauncherActivity 启动逻辑,主应用直接跳转到订单状态页 - 更新 ZDManager 初始化方法,支持发布版本和 CRM 版本切换
This commit is contained in:
@ -11,25 +11,22 @@ import com.za.service.location.ZdLocationManager
|
||||
|
||||
object ZDManager {
|
||||
lateinit var application : Application
|
||||
fun init(application : Application) {
|
||||
fun init(application : Application, isRelease : Boolean = false) {
|
||||
this.application = application
|
||||
thirdSdkInit()
|
||||
thirdSdkInit(isRelease)
|
||||
}
|
||||
|
||||
private fun thirdSdkInit() {
|
||||
private fun thirdSdkInit(isRelease : Boolean = false) {
|
||||
if (isRelease) {
|
||||
AppConfig.release()
|
||||
} else {
|
||||
AppConfig.crm1()
|
||||
}
|
||||
GlobalData.application = application
|
||||
MMKV.initialize(application, MMKVLogLevel.LevelInfo)
|
||||
Bugly.init(application, "6972a6b56d", true)
|
||||
AppConfig.crm1()
|
||||
LogUtil.init(application)
|
||||
RoomHelper.init(application)
|
||||
ZdLocationManager.init(application)
|
||||
|
||||
|
||||
// 初始化讯飞SDK
|
||||
//科大讯飞初始化
|
||||
// SpeechUtility.createUtility(application,
|
||||
// SpeechConstant.APPID + "=6fd4aabe," + SpeechConstant.FORCE_LOGIN + "=true")
|
||||
// SpeechManager.init(application)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user