[TIMOB-24] API - Push Notifications
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:50:09.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 0.8.0 |
Components | iOS |
Labels | n/a |
Reporter | Nolan Wright |
Assignee | Blain Hamon |
Created | 2011-04-15T02:22:39.000+0000 |
Updated | 2011-04-17T01:50:09.000+0000 |
Description
Description
The purpose of this API is to define the Push Notification spec for iPhone
Examples
// register for push notifications
Titanium.Network.registerForPushNotifications({
types:[Titanium.Network.NOTIFICATION_TYPE_BADGE, Titanium.Network.NOTIFICATION_TYPE_ALERT, Titanium.Network.NOTIFICATION_TYPE_SOUND],
success:function(deviceToken)
{
},
error: function(error)
{
},
callback:myfunction
});
function myfunction(data)
{
// returns payload JSON object
}
see http://developer.apple.com/iphone/library/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW1
for JSON object spec
Was suggested to change it from UI to Titanium.Network (Titanium.Network.iPhone.pushNotification?)
Also suggesting that we rename pushNotificationRegistrationFailed and handlePushNotification to addEventListeners of 'registrationFailed' and 'pushNotification', or otherwise indicate that this is adding a callback function instead of invoking one.
(from [6aacb9a143ca74066ff76117da3f4b6f66c166ff]) [#24 state:resolved] more fixes for push notifications and testing on device [#199 state:resolved] implementation of application properties added Settings.bundle to Kitchen Sink and related tests
http://github.com/appcelerator/titanium_mobile/commit/6aacb9a143ca74066ff76117da3f4b6f66c166ff"> http://github.com/appcelerator/titanium_mobile/commit/6aacb9a143ca7...