Deploy to a BlackBerry PlayBook device
Before you begin:
- Make sure you have requested a debug token signing file (client-PBDT-xxxxx.csj) and registered it. If you haven’t requested and registered code signing keys, see Set up for signing BlackBerry PlayBook apps.
- Make sure that your BlackBerry PlayBook tablet is on the same network as your computer. You might want to disconnect from VPN connections to avoid connection problems.
To deploy your application to the BlackBerry PlayBook tablet you first must package it with the debug token information.
- changing the version number of your application
- accessing the internet
- exporting a release build of your application
Debug tokens are valid for 30 days. When a debug token expires, the BlackBerry PlayBook no longer allows unsigned apps that rely on that token to run. You are limited to a total of 100 device PINs across all of your debug tokens that are currently active. If you create debug tokens that address 100 PINs, you must wait for some of your debug tokens to expire before you create more.
Create a debug token
- At a command prompt, navigate to blackberry-tablet-sdk\bin in the BlackBerry WebWorks SDK for BlackBerry Tablet OS
- Create a
debug token for your device by using the following syntax and values for the command line
blackberry-debugtokenrequest -storepass <KeystorePassword> -devicepin <device PIN> <debug_token_file_name.bar>If you have mutliple devices you wish to test on, list their PINs in a file, and use the following command:
blackberry-debugtokenrequest -storepass <KeystorePassword> -devicepinlist <device_PIN_list_file> <debug_token_file_name.bar>
|KeystorePassword||The password you defined when you created your developer certificate.|
|device PIN||The PIN of the BlackBerry device on which you want to install this debug token.|
The name of a file containing the PINs of the BlackBerry devices on which you want to install this debug token. For example, a sample <device_PIN_list_file> called device_PINs.txt might look this:
12G34H56 2K672HVP 221Q2958
You would specify it like this:
The file name of the debug token you want to create. The debug token file must end with .bar. If you specify the name of an existing file, the blackberry-debugtokenrequest tool deletes the file before the tool creates the debug token.
If you specify a path that does not include a file name, the blackberry-debugtokenrequest tool deletes the directory you specify and does not create a debug token.
You can now distribute or install the debug token you created.
Install a debug token
- On the home screen of the BlackBerry device, tap the Settings icon to open the Options screen.
- In the list of options, select Security.
- In the list of security options, select Development Mode.
- At a command prompt, navigate to blackberry-tablet-sdk\bin in BlackBerry WebWorks SDK for BlackBerry Tablet OS
- Type the following command:
blackberry-deploy -installDebugToken <path to debug token> -device <IP address of device> -password <device password>
After the command executes, the result::success message displays indicating that you successfully installed the debug token.
Make the debug token available to the packager
- In the BlackBerry WebWorks SDK for BlackBerry Tablet OS installation folder, navigate to the bbwp\bin folder.
- Using a text editor, open the bbwp.properties file.
- Add the path to the debug token file by using
<debug_token>path to debug token file</debug_token>
Example: bbwp.properties file with path to debug token file
<?xml version="1.0" encoding="UTF-8"?> <wcp> <additional>-quiet</additional> <java>C:\Program Files\Research In Motion\BlackBerry WebWorks SDK for TabletOS 2.1.0\jre</java> <wcp_template>AirAppTemplates</wcp_template> <air_template>AirAppTemplates</air_template> <tablet_sdk>C:\Program Files\Research In Motion\BlackBerry WebWorks SDK for TabletOS 2.1.0\bbwp\blackberry-tablet-sdk</tablet_sdk> <extension_repository>ext</extension_repository> <debug_token>C:\my_debug_token.bar</debug_token> </wcp>
You can now load your debug-enabled application on a BlackBerry PlayBook without having to sign it.
Packaging your application with a debug token
- There is a <debug_token> element in bbwp.properties and it contains the full pathname of a valid debug token file.
- Signing is NOT specified (i.e., no -gcsk and no -gp12 specified) when you package your application.
If your operating system is Windows 7 or Windows Vista, you may need to ensure that bbwp and java are running with administrator access. Otherwise, these executables will not have access to run, and you will encounter errors when you try to build your BlackBerry WebWorks application.
- At a command prompt, navigate to the installation folder for the BlackBerry WebWorks Packager.
- Package the
application by using the following syntax:
bbwp [drive:][path]archive -d [-o dir]
bbwp C:\myapp\myarchive.zip -d -o C:\myapp\output
Mac OS example:
./bbwp ~/myapp/myarchive.zip -d -o ~/myapp/output
During the ackaging process, the BlackBerry WebWorks Packager displays multiple messages, and indicates a successful packaging process if the application archive contains no errors.
- If successful, this process creates a .bar file in the folder specified by the -o parameter. If no -o parameter is specified, the .bar file is created in a subfolder named "bin" that's located in the same folder location as the archive file.
Deploying your app to the BlackBerry PlayBook tablet
- Turn on Development Mode on your BlackBerry PlayBook tablet.
- Obtain the IP address of your BlackBerry PlayBook tablet.
- At a command prompt, navigate to the blackberry-tablet-sdk/bin folder for the BlackBerry WebWorks SDK.
- Deploy the
application using the following syntax:
blackberry-deploy -installApp -password <tablet password> -device <IP_address> -package <BAR file path>
blackberry-deploy -installApp -password playbook -device 220.127.116.11 -package myApp.bar