2016-09-27 39 views
0

我试图找到正确的离子插件分析推送通知两个Android平台的iOS &。Ionic Android Parse-Push插件

我的要求是:接收解析推送通知(在iOSiOS中)。

我已经尝试过这种解析推插件: https://github.com/avivais/phonegap-parse-plugin

在app.js:

run(function($ionicPlatform) { 
    $ionicPlatform.ready(function() { 
    if(window.ParsePushPlugin){ 
     ParsePushPlugin.subscribe('SampleChannel', function(msg) { 
     alert(msg); 
    }, function(e) { 
    alert('error'+e); 
    }); 

    ParsePushPlugin.getInstallationId(function(id) { 
    // note that the javascript client has its own installation id, 
    // which is different from the device installation id. 
    alert("device installationId: " + id); 
    }, function(e) { 
    alert('error' +e); 
    }); 

    ParsePushPlugin.getSubscriptions(function(subscriptions) { 
    alert(subscriptions); 
    }, function(e) { 
    alert('error'+e); 
    }); 

    } 

当我编译我的Android设备上我的应用程序,警报工作! 但在我的解析集合(集合称为'安装')没有新的出现。没有行存储!

有人可以帮助我吗?

回答

0

不使用Parse,它会消失,你可以在parse.com上检查这个。相反,请使用OneSignal。

+0

我已经有一个使用Parse的后端,我们希望使用Parse api通道。 – Lore90

+0

你解决了吗?对于我来说,在config.xml上放置客户端密钥(不是JavaScript密钥)是可行的 –