If you have a mobile optimized website and would like to gauge interest on whether or not you should invest time in creating a full-fledged application, a URL launching application may be right for you. No coding is required.
The idea behind a URL launcher is that it’s basically a bookmark that opens up the browser application and links to a URL that you provide. The only things you need to configure are the Name, ID, URL, and provide an icon.
Information on how to make a Web launcher for a BlackBerry® smartphone’s with BlackBerry OS 5,6 and 7 can be found here.
Outline:
Step 1: Download and install the latest BlackBerry SDK for Adobe AIR
Download the latest BlackBerry SDK for Adobe AIR from this site - https://developer.blackberry.com/air/download/sdk/.
Once downloaded install the SDK by following the setup wizard.
Step 2: Register for signing keys
If you have signing keys and a developer certificate already you can skip to step 4. If you forgot or need signing keys please visit this site. There is a self-help walkthrough on the site and after you register you will receive your keys by email within 2 hours.
Step 3: Create a Developer Certificate
You will need to create a developer certificate to sign your URL launcher. The steps outlined here for BlackBerry 10 and here for BlackBerry PlayBook will show you how to create a developer certificate. Your developer certificate will have a .p12 extension.
Step 4: Create an icon
Create an icon in your favorite graphic editing program. The dimensions are as follows:
86x86 for BlackBerry® PlayBook™
114x114 for BlackBerry® 10
Step 5: Create an XML descriptor file
An XML descriptor file contains all the information needed for our application. If using Windows® open up Notepad or if using a Mac open up TextEdit and copy the following XML into it:
<qnx>
<id>My Application</id>
<name>My Application</name>
<uri>http://www.blackberry.com</uri>
<versionNumber>1.0.0</versionNumber>
<initialWindow>
<systemChrome>none</systemChrome>
<transparent>false</transparent>
</initialWindow>
<icon><image>86x86.png</image></icon>
</qnx>
Edit the <id>, <name>, <uri>, and <image> nodes.
Save your file as “descriptor.xml”.
Step 6: Copy files to bin folder *optional
Next we will copy over all of our files to the bin folder of our BlackBerry SDK for Adobe AIR installation. This is optional but makes it cleaner in our next step to type our command to create our application.
The default location on Windows is:
C:\Program Files\Research In Motion\blackberry-tablet-sdk-2.0.0\bin
The default location on a Mac is:
/Developer/SDKs/Research In Motion/blackberry-tablet-sdk-2.0.0/bin
Copy over these files:
Developer Certificate - “author.p12”
Icon – “86x86.png”
XML Descriptor – “descriptor.xml”
Step 7: Package application from the command line
Open up a command line window and navigate to the bin folder. The following command will create your application and output a .bar file.
blackberry-uripackager -package myApplication.bar descriptor.xml 86x86.png -buildId 1 -signRIM -signDev -keystore author.p12 -storepass storepassword -cskpass cskpassword
Green = you need to edit it.
Note: The -buildId argument must be incremented each time you run the command.
A successfully signed application should look like this:
Step 8: Test your application
The final step is to test your application. The following steps will work if you have a BlackBerry PlayBook or if you’re using a simulator.
Put your BlackBerry in development mode by going into: Options -> Security -> Development Mode and toggling Use Development Mode to on.
On the top bar of the PlayBook there will be a developer mode icon you can click to see what your IP address is. I am installing over Wi-Fi® in this example.
Run the following command to install your application.
blackberry-deploy -installApp -device DeviceIP -password DevicePassword myApplication.bar
A successful install should look like this:
Here is what the Icon will look like on the PlayBook:
Here is what the running application will look like:
Conclusion
You should now have a successfully signed application that is ready to be submitted to BlackBerry World.
For more information about the BlackBerry World storefront, see the following resources: