API levels

An API level determines which APIs are available for you to use in your app. The API level corresponds to a version of the BlackBerry 10 OS (for example, 10.0, 10.1, and 10.2). When you create a project for your app and select an API level, you are choosing the version of the BlackBerry 10 OS that your app is compatible with.

The API level is backward compatible. Higher API levels include all the APIs from lower API levels. APIs are deprecated, but are not removed, to ensure that existing apps can continue to use them.

You can select Use Global as your API level to use the global API level that applies to all of your projects or you can specify an API level for each project you create. By default, new projects use the global API level. If you update the global API level, the API level of your project changes automatically.

API levels and supported devices

Each API level supports particular devices. When you select an API level, you see a list of devices that the API level is supported on. The API level of your app must correspond to the API level of the device that you want to run your app on. Apps that are developed with a lower API level are supported on existing devices, and can reach a broader market. However, apps that are developed with a higher API level can take advantage of a richer set of APIs and features.

If your app uses APIs that were introduced in a higher API level, you won't be able to install the app on a device with a lower API level. However, you can run an app with a lower API level on a device with a higher API level, because API levels are backward compatible.

Changing the API level

In the Momentics IDE for BlackBerry, you can change the global API level and the API level for a specific project at any time. To change the global API level:

  1. In Windows and Linux, click Window > Preferences. In Mac OS, click Momentics > Preferences.
  2. Expand BlackBerry and click API Level.
  3. Select the API level to use for all projects that have the Use Global option set.

To change the API level of an existing project:

  1. Select your project in the Project Explorer.
  2. Right-click the project and click Properties.
  3. Click BlackBerry API Level and select the API level that your projects supports from the drop-down list.
  4. Click Apply and click OK.

Last modified: 2013-12-21

comments powered by Disqus