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:
陈君陶
2024-06-25 16:14:40 +08:00
2 changed files with 11 additions and 7 deletions

View File

@ -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')

View File

@ -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)
}