移植解析“deviceToken”到FCM注册令牌 [英] Migrate parse "deviceToken" to FCM registration token
问题描述
现在我们正在迁移到firebase,并不能保证所有的用户都会打开应用程序,所以FCM获取新的FCM注册令牌。
问题是我可以发送给旧的解析用户,因为我有他们的解析设备令牌(从安装表)?
我敢肯定,您不能只导入 更多详细信息可以在将您的Parse Android应用迁移到Firebase (或者如果您使用 iOS )docs: 建议的迁移策略:迁移设备标记 在撰写本文时,Parse Android SDK使用旧版本的FCM注册令牌,与Firebase通知提供的功能不兼容。 您可以通过将FCM SDK添加到您的应用程序来获得新的令牌;但是,这可能会使Parse SDK使用的令牌无效以接收通知。如果您想避免这种情况,可以将Parse SDK设置为同时使用Parse的发件人ID和发件人ID。这样您就不会使Parse SDK使用的令牌失效,但请注意,当Parse关闭其项目时,此解决方法将停止工作。 从我的答案这里。 I have thousands of users on Parse, and we are sending push notifications to them using parse.
Now we are migrating to firebase and can't guarantee that all users will open the app so FCM gets the new FCM registration token.
The question is can I send to old Parse users given I have their Parse device token (from installation table)? 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. From my answer here. 这篇关于移植解析“deviceToken”到FCM注册令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!