Phonegap 3.0.0 plugin for Parse.com push service
Using Parse.com's REST API for push requires the installation id, which isn't available in JS
This plugin exposes the four native Android API push services to JS:
phonegap local plugin add https://github.com/benjie/phonegap-parse-plugin
<script type="text/javascript>
parsePlugin.initialize(appId, clientKey, function() {
alert('success');
}, function(e) {
alert('error');
});
parsePlugin.getInstallationId(function(id) {
alert(id);
}, function(e) {
alert('error');
});
parsePlugin.getSubscriptions(function(subscriptions) {
alert(subscriptions);
}, function(e) {
alert('error');
});
parsePlugin.subscribe('SampleChannel', function() {
alert('OK');
}, function(e) {
alert('error');
});
parsePlugin.unsubscribe('SampleChannel', function(msg) {
alert('OK');
}, function(e) {
alert('error');
});
</script>
Phonegap > 3.0.0