Skip to content

Instantly share code, notes, and snippets.

@edewit
Created March 3, 2014 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edewit/9329642 to your computer and use it in GitHub Desktop.
Save edewit/9329642 to your computer and use it in GitHub Desktop.
var pushConfig = {
pushServerURL: "<pushServerURL e.g http(s)//host:port/context >",
alias: "<alias e.g. a username or an email address optional>",
android: {
senderID: "<senderID e.g Google Project ID only for android>",
variantID: "<variantID e.g. 1234456-234320>",
variantSecret: "<variantSecret e.g. 1234456-234320>"
},
ios: {
variantID: "<variantID e.g. 1234456-234320>",
variantSecret: "<variantSecret e.g. 1234456-234320>"
}
};
push.register(onNotification, errorHandler, pushConfig);
function onNotification(event) {
alert(event.alert);
}
function errorHandler(error) {
throw error;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment