Merge branch 'hotfix/v5.35.1-1051/disable_jcore_auto_init' into 'release'
feat: 恢复极光推送,移除极光自动初始化 https://jira.shanqu.cc/browse/GHZSCY-5342 See merge request halo/android/assistant-android!1658
This commit is contained in:
@ -414,13 +414,13 @@ dependencies {
|
||||
}
|
||||
internalImplementation(project(':module_internal_test'))
|
||||
|
||||
// def pushProperty = findProperty('BUILD_PUSH_TYPE')
|
||||
// // 根据BUILD_PUSH_TYPE决定使用哪个推送SDK,目前默认使用极光推送
|
||||
// def pushProject = (pushProperty == null || pushProperty == 'jg')
|
||||
// ? project(':feature:jg_push') : project(':feature:acloud_push')
|
||||
// implementation(pushProject) {
|
||||
// exclude group: 'androidx.swiperefreshlayout'
|
||||
// }
|
||||
def pushProperty = findProperty('BUILD_PUSH_TYPE')
|
||||
// 根据BUILD_PUSH_TYPE决定使用哪个推送SDK,目前默认使用极光推送
|
||||
def pushProject = (pushProperty == null || pushProperty == 'jg')
|
||||
? project(':feature:jg_push') : project(':feature:acloud_push')
|
||||
implementation(pushProject) {
|
||||
exclude group: 'androidx.swiperefreshlayout'
|
||||
}
|
||||
}
|
||||
|
||||
File propFile = file('sign.properties')
|
||||
|
||||
@ -3,6 +3,7 @@ package com.gh.gamecenter.jg.push
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import cn.jiguang.api.utils.JCollectionAuth
|
||||
import cn.jpush.android.api.JPushInterface
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.gh.gamecenter.common.constant.RouteConsts
|
||||
@ -18,6 +19,9 @@ object JPushHelper {
|
||||
private var badgeCount = 0 // 角标计数
|
||||
|
||||
fun init(applicationContext: Context) {
|
||||
// 关闭SDK自启动 (https://docs.jiguang.cn/jverification/guideline/jghgzy)
|
||||
JCollectionAuth.enableAutoWakeup(applicationContext, false)
|
||||
|
||||
JPushInterface.setDebugMode(BuildConfig.DEBUG)
|
||||
JPushInterface.init(applicationContext)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user