Skip to content

Instantly share code, notes, and snippets.

@RonaldV
Created June 28, 2012 18:24
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 RonaldV/3013063 to your computer and use it in GitHub Desktop.
Save RonaldV/3013063 to your computer and use it in GitHub Desktop.
Init of geology
geoloqi.init({
clientId : 'the key',
clientSecret : 'the secret',
trackingProfile : 'PASSIVE',
}, {
onSuccess : function() {
Ti.Network.registerForPushNotifications({
types : [Titanium.Network.NOTIFICATION_TYPE_ALERT, Titanium.Network.NOTIFICATION_TYPE_BADGE],
callback : function(data) {
Geoloqi.iOS.handlePush(data);
},
success : function(data) {
Geoloqi.iOS.registerDeviceToken(data.deviceToken);
},
error : function(data) {
alert(JSON.stringify(data));
Ti.API.error('Could Not Register For Push' + data.error + data.type);
}
});
},
onFailure : function() {
Ti.API.error('Geoloqi Config Failed');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment