firebase fcm 的设备注册 ID 是什么,我可以在哪里提取它们?

from pyfcm import FCMNotification


push_service = FCMNotification(api_key="<api-key>")


registration_id = "<device registration_id>"

message_title = "Uber update"

message_body = "Hi john, your customized news for today is ready"

result = push_service.notify_single_device(registration_id=registration_id, message_title=message_title, message_body=message_body)


print result

我正在使用 Pyfcm 进行推送通知,我想获取设备注册 ID。


www说
浏览 220回答 1
1回答

白衣染霜花

你可以得到&nbsp;token(=device registration_id)在我的代码中:String&nbsp;newToken=&nbsp;instanceIdResult.getToken();也许在你的代码中:String&nbsp;newToken&nbsp;=&nbsp;FirebaseInstanceId.getInstance().getToken();所以&nbsp;newToken = device registration_id
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python