Detecting a changed SIM card
When a user changes a SIM card in a BlackBerry device, the BlackBerry 10 WebWorks SDK automatically destroys the channel to the PPG for security purposes. A new user might be using the device, and that user shouldn't receive push messages that were intended for the previous user. In your application, you should authenticate all new users, and create a new channel to the PPG.
The sample application passes in the onSimChange() callback function as part of the call to PushService.create() which creates the PushService object.
blackberry.push.PushService.create(ops, sample.pushcapture.successCreatePushService, sample.pushcapture.failCreatePushService, sample.pushcapture.onSimChange, sample.pushcapture.onPushTransportReady);
- Removes the user and all the push messages associated with the user from the database.
- Removes notifications in the BlackBerry Hub that are associated with the user.
- Unsubscribes the user from the Push Initiator if the user chose to subscribe with the Push Service SDK.
- Displays a message indicating that the SIM card has changed.
- Displays the Register screen so that a new user, or the same user with a new SIM card, can register.
Last modified: 2014-03-10