Commit 6c6c1bed authored by guest's avatar guest

修改fcmtoken上报需求

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