How import device token into Firebase? I have JSON from parse.com

浪尽此生 提交于 2020-02-25 04:16:57

问题


I'm trying to switch the push message service. The new push service is Firebase. I have JSON with tokens from parse.com, but can't find how to import it in Firebase.


回答1:


I'm pretty sure you can't just import the tokens used by parse.com to Firebase Cloud Messaging for use. What should be done is to register your client app users to FCM by adding it to your app.

More details can be found in the Migrate your Parse Android App to Firebase (or if you're using iOS) docs:

Suggested Migration Strategy: Migrating Device Tokens

At the time of writing, the Parse Android SDK uses an older version of the FCM registration tokens, not compatible with the features offered by Firebase Notifications.

You can get a new token by adding the FCM SDK to your app; however, this might invalidate the token used by the Parse SDK to receive notifications. If you want to avoid that, you can set up the Parse SDK to use both Parse's sender ID and your sender ID. In this way you don't invalidate the token used by the Parse SDK, but be aware that this workaround will stop working when Parse shuts down its project.



来源:https://stackoverflow.com/questions/39992636/how-import-device-token-into-firebase-i-have-json-from-parse-com

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!