如果我通过从 Firebase 控制台选择包来发送推送消息,则推送会发送到所有设备,但在发送到单个设备期间,会显示错误:
Invalid reg token,please check token format
错误快照:
最佳答案
控制台中的 UserID 不是 Firebase 消息传递的注册 token 。通过Firebase docs :
on initial startup of your app, the FCM SDK generates a registration token for the client app instance. If you want to target single devices or create device groups, you'll need to access this token by extending FirebaseInstanceIdService.
我的最后一个注册 token 看起来像 cpeBAC1NkUE:APA91bEpAKHQTdgkWVdDzDZG8BPon0APaIhbbuSejDpZF-FO1gD2saDV7_EQDo2WEz0H6e5U-uf0i-v4b25NXgGzV2oUrNuboM5675WY7VCP3JcBl8BCNY7eV0VFGHT9oRox0EEoo_ch
关于android - Firebase 通知 - 无效的注册 token ,请检查 Android 中的 token 格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42324784/