Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

ACS Push Notification

View acspushnotification.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Cloud.Users.login({
login : 'default',
password : 'default'
}, function(e) {
if (e.success) {
var user = e.users[0];
alert('Success:\\n' + 'id: ' + user.id + '\\n' + 'first name: ' + user.first_name + '\\n' + 'last name: ' + user.last_name);
 
// Now that you've logged in, register for PNS
var myPushDeviceToken
Ti.Network.registerForPushNotifications({
type : [Ti.Network.NOTIFICATION_TYPE_ALERT, Ti.Network.NOTIFICATION_TYPE_BADGE, Ti.Network.NOTIFICATION_TYPE_SOUND],
success : myPushDeviceToken
});
} else {
alert('Error:\\n' + ((e.error && e.message) || JSON.stringify(e)));
}
});

This is a fragment used to assist someone in the Atlanta Titanium User Group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.