function deviceTokenSuccess(e) { | |
Ti.API.info('Device Token: ' + e.deviceToken); | |
deviceTokenLabel.text = 'Device Token:' + e.deviceToken; | |
enablePush.enabled = true; | |
var Cloud = require("ti.cloud"); | |
Cloud.PushNotifications.subscribeToken({ | |
device_token: APP.Push.deviceToken, | |
channel: "test, | |
type: Ti.Platform.name === 'android' ? 'android' : 'ios' | |
}, function(e) { | |
if(e.success) { | |
alert("Success"); | |
} else { | |
alert("Fail") | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment