blackberry-webworks/WebWorks-API-Docs — pull request #190 by mdandrea (2012-09-13 15:57:54+00:00)
Title: Changes to support new pushTransportReady callback.

Changes were made to push in the NDK as well as the AIR SDK to add a new callback that indicates when the push transport is up and ready.
(for PR 202168 -Add callback (onPushTransportReady) to give feedback when relay connectivity is available)

This change adds support for it in WebWorks. It needs to make it into the 10.0.09 release of the WebWorks SDK.

IMPORTANT NOTE: This change is currently only in trunk and has not made it into 10.0.09 OS builds as of yet. It will shortly. I'll update this pull request with the supported 10.0.09 build when I know it.

As a result of this change, some error codes had to be renamed as well.

Here's how it works:
1. You specify the new callback when you call static create.
2. You perform a create channel with Wi-Fi (or mobile network) turned off. You will get back a PUSH_TRANSPORT_UNAVAILABLE error.
3. Turn Wi-Fi (or mobile network) back on and your new callback should be called (possibly after a couple of seconds).
4. Similar thing for destroy channel. You perform a destroy channel with Wi-Fi turned off. You will get back a PUSH_TRANSPORT_UNAVAILABLE error. Turn Wi-Fi (or mobile network) back on and your callback should be called (possibly after a couple of seconds).