1
我按照Ionic的guide上的所有说明进行推送通知,但注册用户似乎不工作。离子推送设备寄存器
我加入这个代码我的$ ionicPlatform.ready函数内部:
$ionicPush.register().then(function(t) {
return $ionicPush.saveToken(t);
}, function(e) {
console.log(e);
}).then(function(t) {
console.log('Token saved:', t.token);
});
我有断点在两个承诺的线条,但它达到没有。
另外,在应用程序一分钟后,我得到这个错误:
POST https://api.ionic.io/insights 422 (UNPROCESSABLE ENTITY) Ionic Insights: Could not send insights. Error: UNPROCESSABLE ENTITY(…)
的应用程序是运行在Android上。