Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24] API - Push Notifications

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:50:09.000+0000
Affected Version/sn/a
Fix Version/sRelease 0.8.0
ComponentsiOS
Labelsn/a
ReporterNolan Wright
AssigneeBlain Hamon
Created2011-04-15T02:22:39.000+0000
Updated2011-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

Comments

  1. Blain Hamon 2011-04-15

    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.

  2. Jeff Haynie 2011-04-15

    (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...

JSON Source