-
-
Save RonaldV/3013063 to your computer and use it in GitHub Desktop.
Init of geology
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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