• Save
Introduction to the BlackBerry Native SDK
Upcoming SlideShare
Loading in...5
×
 

Introduction to the BlackBerry Native SDK

on

  • 4,986 views

This presentation provides an introduction to the BlackBerry® PlayBook™ Native SDK and how to build a sample application. Topics explored include where and what comes in the SDK, how apps are ...

This presentation provides an introduction to the BlackBerry® PlayBook™ Native SDK and how to build a sample application. Topics explored include where and what comes in the SDK, how apps are packaged, what goes into a small app, and a tutorial for building a sample.

Statistics

Views

Total Views
4,986
Views on SlideShare
4,922
Embed Views
64

Actions

Likes
2
Downloads
0
Comments
0

4 Embeds 64

http://blackberry.github.com 49
http://localhost 6
http://blackberry-community.github.com 5
http://blackberry.github.io 4

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Introduction to the BlackBerry Native SDK Introduction to the BlackBerry Native SDK Presentation Transcript

    • Introduction to the BlackBerryPlayBook Native SDK: Buildinga Sample ApplicationNick Landry, David CummingsDEV319February 7-8, 2012
    • Belligerent Blocks(github.com/blackberry/NDK-Samples)What can you do in a few weeks?
    • Belligerent Blocks• Graphics• Sound• Touch events• Pause/Resume• Scoreloop Leaderboard• Local leaderboard (if offline)
    • Agenda Where to get the SDK What comes in the SDK How are apps packaged What goes into a small app Belligerent Blocks The next steps… 4
    • Where to get the SDK http://developer.blackberry.com/native/download Look for this! 5
    • Agenda Where to get the SDK What comes in the SDK How are apps packaged What goes into a small app Belligerent Blocks The next steps… 6
    • What comes in the SDK?Tools IDE Compiler tool-chain Deployment utilitiesPlatform Headers and Libraries 7
    • The IDEWhat comes in the SDK An Eclipse® based IDE Debugger Easy device deployment Create signed release builds Built-in profiling tools 8
    • Command-Line ToolsWhat comes in the SDK MinGW (on Windows®) with Make GCC based tool-chain blackberry-nativepackager: package an app blackberry-deploy: put a packaged app onto the device blackberry-connect: allow ssh access to the device blackberry-signer: sign a packaged app 9
    • LibrariesWhat comes in the SDK QNX® provided POSIX headers and library SQLite3® database engine Freetype2 for fonts 10
    • Open GL ES and EGLWhat comes in the SDK Standard embedded graphics stack Similar to every other mobile platform Libscreen is the native window API 11
    • OpenALWhat comes in the SDK Sound library available on different platforms Play sound effects Play looping background music See Belligerent Blocks Sound.cpp and Sound.h 12
    • BPSWhat comes in the SDK BlackBerry® Platform Services The app’s event queue Window state events Accelerometer,dialogs,geolocation,etc. 13
    • ScoreloopWhat comes in the SDK For NDK 1.0, go to http://blackberry.com/beta Included in NDK 2.0 betas Adds social features to games Leaderboards, challenges, achievements, and more 14
    • The Big Picture Cascades Application Native Application Gaming & Porting Developers Developers Developers C++ UI framework NDK 1.0 (following Qt idioms) Cascades NDK 2.0 Application Infrastructure & Platform API (C++)C++ platform APIs and Qt Qt Libraries Wide range of APIs Meta Plat. (C/C++) Core C APIs: QNX, BPS, Graphics, etc. Platform API ( C ) 15 15
    • Agenda Where to get the SDK What comes in the SDK How are apps packaged What goes into a small app Belligerent Blocks The next steps… 16
    • Creating a BARHow are apps packaged Apps are installed from BlackBerry ARchives BAR file contains executable, images, music, etc. Created through IDE or command-line BAR BAR Files Descriptor 17
    • BAR Descriptor File IDE creates basic bar-descriptor.xml Contains meta-data about the app Paths to files (assets) for BAR inclusion 18
    • BAR Meta-DataHow are apps packed Name, package, author, version Icon (asset to use as an icon) Splashscreen (asset to use as a splashscreen) Set of permissions (run_native at a minimum) Entry-Point (the asset to execute on launch) 19
    • Adding Read-Only AssetsHow are apps packagedInclude the asset:<asset path="Assets/splash.png">splash.png</asset>Deployed on PlayBook as:./app/native/splash.png (read-only)Now set splash.png as the splashscreen:<splashscreen>splash.png</splashscreen> 20
    • Adding Read-Write AssetsHow are apps packagedInclude the asset:<asset path="Assets/scores.db">data/scores.db</asset>Deployed on BlackBerry PlayBook as:./app/native/data/scores.db (read-only)Now copy it to:./data/scores.db (read-write) 21
    • Deploying BARsHow are apps packaged BARs are created in an unsigned state Unsigned BARs can be installed using a Debug Token RDK key used for releases PBDT key used to create debug tokens Go here to get both keys: http://developer.blackberry.com/native/signingkey 22
    • Agenda Where to get the SDK What comes in the SDK How are apps packaged What goes into a small app Belligerent Blocks The next steps… 23
    • Initial CodeSmall App Things to initialize and load  Graphics stack  BPS  Initialize app logic  Load assets Start app loop 24
    • GraphicsSmall App Create libscreen context and window Create an EGL window surface Initialize OpenGL® for 2D rendering Tutorials on the developer native site 25
    • Event LoopSmall Appwhile (true) { bps_get_event(&event, 0); if (event == NULL) { break; } if (bps_event_get_domain(event) == navigator_get_domain()) { switch(bps_event_get_code(event)) { case NAVIGATOR_EXIT: onExit(); break; } }} 26
    • Agenda Where to get the SDK What comes in the SDK How are apps packaged What goes into a small app Belligerent Blocks The next steps… 27
    • bbutilBelligerent Blocks bbutil.h, bbutil.c are seen in many samples Sample libscreen/EGL setup Orientation lock Orientation change handling Text rendering with GL ES 1.1 Loading textures with libpng 28
    • Adding PhysicsBelligerent Blocks Box2D ported to BlackBerry Tablet OS Available through github.com/blackberry Latest version 2.2 is available Grab it from github, import into IDE 29
    • Leaderboard Belligerent Blocks Uses Scoreloop if there is an internet connection Otherwise, uses local SQLite3 database 30
    • Scoreloop IntegrationBelligerent Blocks// Event loop:bps_event_t* event;bps_get_event(&event, 0);if (PAL_HandleBPSEvent(&m_scoreloopInitData, event) == BPS_SUCCESS) { continue;}// Handle events.... 31
    • Server-SideBelligerent Blocks 32
    • Playing Belligerent Blocks 33
    • Agenda Where to get the SDK What comes in the SDK How are apps packaged What goes into a minimal app Belligerent Blocks The next steps… 34
    • Looking AheadNext Steps… Scoreloop API: moved into the NDK More BPS: Magnetometer, Gyroscope 2.0 Beta: http://developer.blackberry.com/native/beta Cascades: C++ UI framework 35
    • The SamplesNext Steps…  Locking/defining starting orientation  Orientation change handling  Loading textures  Rendering text  Touchscreen / mouse input handling  Accelerometer  http://developer.blackberry.com/native/sampleapps 36
    • More resources…Next Steps…http://developer.blackberry.com/native/documentation Tutorials Recipes Reference manualhttp://developer.blackberry.com/native Click on Support Forums 37
    • Other Sessions…TuesdayDEV315 - Game Makers Dream: The BlackBerry PlayBook Native SDK (14:45)DEV340 - Lab: Introduction to the Native Development Kit (16:15)DEV337 - Introduction to the Cascades UI (17:30)WednesdayDEV385 - BlackBerry® 10 Application Anatomy (09:30)DEV341 - BlackBerry Native SDK for BlackBerry Tablet OS: Advanced Tooling (10:45)GRP304 - Collaboration Roundtable: Native App Development for BlackBerry Tablet OS (12:15)DEV340 - Lab: Introduction to the Native Development Kit (14:15) 38
    • Ask the ExpertsTuesday14:45 – 15:45Wednesday09:30 – 10:3016:45 – 17:45 39
    • One more time… http://developer.blackberry.com/native/download Look for this! 40
    • THANK YOUNick Landry, David CummingsDEV319February 7-8, 2012