Creating your first app

This tutorial will guide you through creating a simple "Hello World" app, and help you verify that you successfully installed and configured the tools.

You will learn to:

  • Set up your project
  • View your app on a simulator
  • View your app on a device

Before you start, make sure you have the necessary tools installed. For more information, see Setting up your tools.

Set up your project

To create your project:

  1. On the Start menu, click BlackBerry WebWorks <version>. A new browser window opens, displaying the BlackBerry 10 WebWorks SDK web tool.
  2. Click [+] beside the Projects heading in the navigation panel.
  3. Enter Hello World in the Project Name field.
  4. Enter C:\TestApps in the Project Path field.
  5. Click Save.

The default app project includes all the necessary artifacts to function as a complete app.

View the app on a simulator

Verify the following on your BlackBerry 10 Device Simulator:
  • Device Password is enabled (Settings > Security and Privacy > Device Password)
  • Development Mode is enabled (Settings > Security and Privacy > Development Mode)

To build your app and deploy it to a simulator:

  1. In the BlackBerry 10 WebWorks SDK web tool, under your project's name in the navigation panel, click Build.
  2. Select Debug Mode.
  3. Select Simulator.
  4. Click Build & Install.

The tool packages your app into a .bar file, installs and launches it on your simulator.

View the app on a device

Verify the following on your BlackBerry 10 device:
  • Development Mode is enabled (Settings > Security and Privacy > Development Mode)
  • Debug token is installed and valid
  1. In the BlackBerry 10 WebWorks SDK web tool, under your project's name in the navigation panel, click Build.
  2. Select Debug Mode.
  3. Select Device.
  4. Enter your device password.
  5. Enter your keystore password, which you defined when you registered your BlackBerry ID token. If you have not yet registered your BlackBerry ID token, see Set up your computer for testing and signing.
  6. Click Build & Install.

Once the app successfully installs on your device and before the app starts for the first time, a dialog box appears. Click OK on this dialog box to permit the app to access various resources on your device. Also, each time the app opens, a dialog box appers to inform you that Web Inspector is enabled.

Last modified: 2014-03-10

comments powered by Disqus