Commit 6c6c1bed authored by guest's avatar guest

修改fcmtoken上报需求

parent 71525fb1
......@@ -51,11 +51,13 @@ object FCMManager {
// Get new FCM registration token
val token: String = task.result
LogEx.logDebug("FCM", "token=$token")
val json = JSONObject()
json.put("token", token)
event("fcm_message_received", ext = json)
if(token!= AppPreferences.getInstance().getString("token", "")){
val json = JSONObject()
json.put("token", token)
event("fcm_message_received", ext = json)
AppPreferences.getInstance().put("token", token)
}
AppPreferences.getInstance().put("token", token)
// Handle new token
Log.d("FCM", "FCM Registration Token: $token")
......
......@@ -14,7 +14,6 @@ object EventUtils {
private val TAG = "EventUtils"
private val push_limit by lazy {
listOf(
"fcm_message_received",
"showNotification",
"Notification_Popup",
"alarm_push",
......
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