Download, build, and deploy the sample app
To download the sample app, visit the samples repository. The repository contains the source code and associated files for the app. The README.md file in the repository contains the instructions that you need to build and deploy the sample app on a BlackBerry device.
The repository contains the following folders:
Folder | Description |
---|---|
Images | This folder contains the images for the sample app. |
Scripts | This folder contains the JavaScript files for the sample app. |
Styles | This folder contains the CSS files for the sample app. |
Configure the sample app
When you run the sample push-enabled app for the first time, you need to specify some configuration information, including the information from the confirmation email message that you received when you registered your Push Initiator to use the Push Service. When you develop your own app, you can hard code this information into your app instead of displaying it in a configuration screen and requiring the user to type the information.
Register the sample app
After you configure the sample push-enabled app, you need to register the app to create a push channel to the PPG to receive push messages.
If you chose to subscribe with the Push Service SDK when you configured the sample app, the Push Initiator requires a username and password that it authenticates before allowing the subscription. The sample app provides a Register dialog box where you can type any username and password.
To see the code that creates the channel and handles the subscription, see Creating a push channel.
Last modified: 2014-03-10
Got questions about leaving a comment? Get answers from our Disqus FAQ.
comments powered by Disqus