I am working on Blackberry Push Notification using MDS. I have referred the sample project HTTPPushDemo which Blackberry API has provided. I am getting pushed data successfully only when app is running. How I will get pushed notification using MDS when app is not running ?
1 Answers
The typical arrangement is to have two apps - the foreground app and the background app. The foreground app has all the UI elements, and it starts when the user clicks on the app icon on the device, and terminates when the user selects 'exit' This would largely be what you've written already.
The background app hides itself - no icon is present in the app switcher or on the device. This means the background app continues to run whether or not the foreground app is running. This allows you to setup the push listener, and keep it running even when your app is "not running"
Both 'apps' actually inhabit the same codebase - you differentiate them by adding a new start argument, and then in the app startup, the code checks whether it should be the foreground or background app, and behaves appropriately.

- 11,776
- 5
- 31
- 44