From 0516d72c1083a22655d80fcb12503eda947e0ec7 Mon Sep 17 00:00:00 2001
From: 18034727885 <973609879@qq.com>
Date: 星期四, 19 三月 2026 18:32:14 +0800
Subject: [PATCH] 去掉极光推送相关功能代码
---
app/src/main/java/com/driver/igotrip/base/MyApplication.kt | 70 +++++++++++++++++-----------------
1 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/app/src/main/java/com/driver/igotrip/base/MyApplication.kt b/app/src/main/java/com/driver/igotrip/base/MyApplication.kt
index f5495fc..d856c18 100644
--- a/app/src/main/java/com/driver/igotrip/base/MyApplication.kt
+++ b/app/src/main/java/com/driver/igotrip/base/MyApplication.kt
@@ -9,8 +9,8 @@
import android.util.Log
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
-import cn.jpush.android.api.JPushInterface
-import cn.jpush.android.api.TagAliasCallback
+//import cn.jpush.android.api.JPushInterface
+//import cn.jpush.android.api.TagAliasCallback
import cn.sinata.rxnetty.LogHelper.initLogs
import cn.sinata.rxnetty.LogHelper.logRecord
import cn.sinata.rxnetty.NettyClient
@@ -88,8 +88,8 @@
LogUtils.OpenLog(true)
initLogs()
initSocket()
- JPushInterface.setDebugMode(true)
- JPushInterface.init(this)
+// JPushInterface.setDebugMode(true)
+// JPushInterface.init(this)
setAlisa()
}
@@ -121,12 +121,12 @@
MSG_SET_ALIAS -> {
Log.d(TAG, "Set alias in handler.")
// 调用 JPush 接口来设置别名。
- JPushInterface.setAliasAndTags(
- applicationContext,
- msg.obj as String,
- null,
- mAliasCallback
- )
+// JPushInterface.setAliasAndTags(
+// applicationContext,
+// msg.obj as String,
+// null,
+// mAliasCallback
+// )
}
MSG_ORDER_CANCEL -> {
@@ -178,31 +178,31 @@
}
}
- private val mAliasCallback =
- TagAliasCallback { code, alias, tags ->
- val logs: String
- when (code) {
- 0 -> {
- logs = "Set tag and alias success"
- Log.i("TAG", logs)
- }
-
- 6002 -> {
- logs = "Failed to set alias and tags due to timeout. Try again after 60s."
- Log.i("TAG", logs)
- // 延迟 60 秒来调用 Handler 设置别名
- var alisa = "DRIVER" + CacheKey.getUserId()
- Handler().postDelayed({
- JPushInterface.setAliasAndTags(this, alisa, null, null)
- }, 60 * 1000)
- }
-
- else -> {
- logs = "Failed with errorCode = $code"
- Log.e("TAG", logs)
- }
- }
- }
+// private val mAliasCallback =
+// TagAliasCallback { code, alias, tags ->
+// val logs: String
+// when (code) {
+// 0 -> {
+// logs = "Set tag and alias success"
+// Log.i("TAG", logs)
+// }
+//
+// 6002 -> {
+// logs = "Failed to set alias and tags due to timeout. Try again after 60s."
+// Log.i("TAG", logs)
+// // 延迟 60 秒来调用 Handler 设置别名
+// var alisa = "DRIVER" + CacheKey.getUserId()
+// Handler().postDelayed({
+// JPushInterface.setAliasAndTags(this, alisa, null, null)
+// }, 60 * 1000)
+// }
+//
+// else -> {
+// logs = "Failed with errorCode = $code"
+// Log.e("TAG", logs)
+// }
+// }
+// }
private fun initSocket() {
Log.e("sendLocation: ", "开始链接")
--
Gitblit v1.7.1