-2
所以我有推送通知的项目,我有与Ionic(客户端 - 接收通知)的应用程序生成,我有服务器推送通知与pyfcm。如何在pyfcm中设置registration_id
在pyfcm中,如何获取registration_id? 我尝试虚拟的registration_id则响应是:
{'failure': 1, 'canonical_ids': 0, 'success': 0, 'multicast_id': 5299463400095790981L, 'results': [{u'error': u'InvalidRegistration'}]}
我有一些教程从这里https://github.com/olucurious/PyFCM这里https://medium.com/@ankushaggarwal/push-notifications-in-ionic-2-658461108c59 ,有被称为代码:
pushObject.on('registration').subscribe((data: any) => {
console.log("device token ->", data.registrationId);
});
我怎么能检索的注册ID?
任何帮助将理解..
如果我在Ionic中写入该行,如何将它与pyfcm register_id集成?因为docs中的教程是针对android studio(java)的 –
之前没有试过离子。你有没有尝试使用可用的插件离子像这样[一](https://github.com/fechanique/cordova-plugin-fcm)? –