Open billymedia opened 9 years ago
Having same issue. I even get the success callback called.
I have ended up subscribing/unsubscribing manually via Parse queries:
parsePlugin.initialize(*APP_ID*,*CLIENT_KEY*, function() {
parsePlugin.getInstallationId(function(id) {
var installationQuery = new Parse.Query(Parse.Installation);
installationQuery.equalTo('installationId', id);
return installationQuery.first().then(function(installation) {
installation.set('channels', ['user_123']);
installation.save();
});
}, function(e) {
console.log('ID ERROR',e);
});
}, function(e) {
console.log('INIT ERROR',e);
});
@billymedia Hi there, where can read about installation.set and save methods?
@anteksiler These methods come from BackboneJS which is used by Parse JS SDK.
I had this same problem. This plugin -> https://github.com/denisbabineau/phonegap-parse-plugin solved my problem. Use following command to install the plugin. cordova plugin add https://github.com/denisbabineau/phonegap-parse-plugin --variable APP_ID=PARSE_APP_ID --variable CLIENT_KEY=PARSE_CLIENT_KEY --variable JS_KEY=PARSE_JS_KEY
I have it installed and registering ok in android / cordova 3 / angular 1.3.6 / parse js sdk 1.4.1.
Once registered, i have a toggle that allows the user to subscribe/unsubscribe to a channel. I am unable to subscribe to a channel, there is no error returned.
This is my subscribe code :
As i can register, i assume the plugin is installed ok and connecting to parse.com with the app id and client key. Can you think of a reason why it wont subscribe?
Note that I did not implement the "Android Quirk" as it threw an error on cordova build, but i can see in a pull request that this is no longer needed.