Sample Apps

To download these samples for PlayBook from BlackBerry GitHub, you must visit the repository and either clone the entire repository using Git or download the entire repository as a .zip file.

Hello Native SDK screenshot

Graphics

Rotating square

This sample demonstrates how to set up BlackBerry Platform Services (BPS), Screen and EGL to display a 2-D rotating square.

Go to the tutorial ›

Get the OpenGL ES 2.0 code Get the OpenGL ES 1.1 code
Falling blocks screenshot

Device

Falling blocks

This sample demonstrates how to add blocks to the screen and move them using touch, accelerometer, and orientation change handling.

Go to the tutorial ›

Download source code
Screenshot from example video

Multimedia

Play a video

This sample demonstrates how to use the multimedia renderer library to play a video on the screen. Currently, this sample works only on the device.

Go to the tutorial ›

Download source code
Belligerent blocks screenshot

Gaming

Belligerent blocks

This game demonstrates rendering 2-D graphics, rendering text, playing sound effects, using Box2D, and more!

Download source code

Graphics and windowing

Rotating cube

This sample demonstrates how to set up BlackBerry Platform Services (BPS), Screen and EGL to display a 3-D rotating cube.

Go to the tutorial ›

Download source code
Screenshot from longboard demo

Gaming

Game development framework

gameplay is an open-source, cross-platform, C++ 3-D gaming framework that makes it easy to learn and write mobile and desktop games. You can find all the code and samples made with the gameplay library on GitHub.

Go to gameplay ›

Native API Examples

Take a look at these examples to learn more about the Native SDK.

Basic application

Good Citizen

Learn about a number of common techniques that you can use in your own applications such as screen events, navigator events, data updates, and scene rendering.

Go to the tutorial ›

Download source code

Basic application

Debug console

Print a string to the console of the QNX Momentics IDE.

Download source code

Communication

Channels

Communicate from one thread to another by sending events through channels.

Download source code

Communication

HTTP proxies

Retrieve the proxy information of the device that was set by the user.

Download source code

Communication

Network status

Retrieve the network status of the device.

Go to the recipe ›

Download source code

Device

Accelerometer

Retrieve accelerometer specific information, such as the pitch and roll of the device.

Go to the recipe ›

Download source code

Device

Geolocation

Retrieve geolocation specific information, such as the latitude, longitude, altitude, and bearing of the device.

Go to the recipe ›

Download source code

Device

Gestures

Capture and process screen gestures such as tap, double-tap, and pinch.

Download source code

Device

Keyboard

Capture and process key input on the virtual keyboard.

Go to the tutorial ›

Download source code

Device

Locale

Retrieve the country and language settings for the device.

Go to the recipe ›

Download source code

Graphics and windowing

Dialogs

Configure and display a system dialog in your application using the dialog service.

Go to the recipe ›

Download source code

Graphics and windowing

Screen

Add a window to the screen and handle navigator and screen events using the Screen and Windowing APIs and BlackBerry Platform Services APIs.

Download source code

Graphics and windowing

Text rendering

Render a customized "Hello world" message to the screen.

Download source code

Monetization

Payment Service

Create purchase requests, handle purchase responses, and retrieve existing purchases using the Payment Service.

Go to the recipe ›

Download source code

Multimedia

Audio settings

Query the device for audio control settings, such as headphone volume, speaker volume, input gain, and mute status.

Go to the recipe ›

Download source code

Multimedia

Play .mp3

Play and adjust volume for a simple .mp3 file using the multimedia renderer and the audio mixer service.

Download source code

Multimedia

Play .wav

Open, determine properties of, and play a .wav file using the sound library.

Download source code

Multimedia

Video overlay

Use gestures and OpenGL ES to show and hide controls for video playback.

Download source code