Introduction to Mobile Development on BlackBerry 10

Transcription

Introduction to Mobile Development on BlackBerry 10
Introduction to Mobile
Development on
BlackBerry 10
Luca Filigheddu
Head of Developer Evangelism EMEA
BlackBerry
@filos
What Is BlackBerry 10?
Ÿ  Completely new
„ 
Not a revision or upgrade of BlackBerry 7
Ÿ  Secure
Ÿ  Designed as a mobile computing
platform
„ 
Not just another mobile phone OS
Ÿ  Designed for people on the move; people
that want to get something done
„ 
Not just consume content on the couch
http://developer.blackberry.com
BlackBerry Z30
•  5” all-touch screen
•  Natural Sound technology
•  4G LTE
•  25hrs battery life
Why developing for BlackBerry 10?
Ecosystem Success
BlackBerry is gaining momentum, with positive,
and
sometimes Success
surging trends
Ecosystem
„ 
„ 
„ 
„ 
„ 
67,000 Registered vendors (doubled since BB10
launch)
262,250 Approved Apps
4.5B Total Downloads
Storefront reach -173 countries
Developer satisfaction (buzz, sentiment, advocacy)
BlackBerry World
Ÿ  Complete digital shopping
BlackBerry
World
experience for
Apps, games, music,
videos
Ÿ  Developers pay no registration fees,
are easily discovered, and enjoy a
quick payback on their development
efforts.
Ÿ  Consistently ranked top-two in
developer friendly vendor sites.*
* Pivot Point Research (July 2013)
BlackBerry World
Ÿ  Over 130,000World
BlackBerry 10 apps
BlackBerry
Ÿ  50+% month over month sales
increase
Ÿ  Developers now submitting up to
3 different apps to BlackBerry World.
Ÿ  Catalogue is expanding
Games now >1/3 of BBW inventory
Ÿ  Carrier billing with 60+ carriers in 35
countries
Ÿ  Over 6.800 BBM connected apps
Games
(1/3 of
BBW)
BlackBerry
World
Growth
BlackBerry World
Developer Community
Developer Community
Net Promoter Score +46 (from -43 in May 2012)1
Developer and Corporate IT sentiment towards
BB10
“on-par” with all leading platforms2
Two thirds of organizations around the world
planning to deploy BB10 applications3
NPS (+46)
BlackBerry Jams
Jams
• BlackBerry
45 cities
•  9,400 attendees
•  10,000 seeded devices
Incredible response
•  70,000 apps approved for sale
at launch
* Source: Vision Mobile (January 2013)
BlackBerry Jams
BlackBerry Jams
Attendees Learn How To
•  Engage customers with an
amazing user experience
•  Take apps to market with a
profitable app development
model
•  Turn millions of BlackBerry users
into loyal, profitable customers
Ecosystem Success
Ecosystem Success
Sentiment
improved 63%
in the past year
(Pivot Point)
38% identify
BlackBerry as
primary platform
(Vision Mobile)
Money!
14
More money for devs!
Ÿ  4% more than iOS developers (per App / month)
Ÿ  >35% more than Android developers (per App /
month)
Ÿ  Developing an app for iOS costs
21% more than Android
„  81% more than BlackBerry
„ 
15
FlyCraft and Pop Corny
16
Ok, now let’s talk about technology!
Acquisitions
Webkit Experts
!
Ripple
Web Development
App Distribution
Platform OS
Social Contacts
UX / UI Design
Device Mgmt.
Social Calendaring
Encryption
Navigation
Social Gaming
Smartphone
Security
18
Platform
Ÿ  Built on QNX Neutrino Real-time OS
Ÿ  Microkernel based OS
Ÿ  POSIX Compliant OS
„ 
(Portable Operating System Interface)
Ÿ  Native C/C++ Applications
„ 
„ 
Direct OpenGL / HW Access
Qt/Cascades for native development
19
Transition
20
BlackBerry 10 SDKs
Java
C/C++
HTML5, CSS, JavaScript
ActionScript
Native SDK
WebWorks
Adobe AIR
Android
Runtime
21
What to choose?
Ÿ  Background and Skills
„  Reuse of existing code, assets
Ÿ  Requirements
„  Cross-portfolio, cross-platform, features
Ÿ  Platform Capabilities
„  APIs, tooling, frameworks, constraints
Ÿ  Tools
„  IDE, utilities, simulation, familiarity
Ÿ  Support
„  Community, docs, samples
22
BlackBerry Native SDK
Standard
• 
• 
• 
• 
• 
• 
• 
• 
• 
• 
STL and POSIX compliant libraries
Screen and Windowing APIs
Gestures library
Input events library
Imaging and Compression
OpenGL ES 1.1/2.0
OpenAL 1.1
Freetype Font Rendering
Math
XML and SQLite Database library
24
Cross-platform Libraries
• 
• 
• 
• 
• 
• 
• 
• 
Boost: portable C++ libraries
Cocos2D-X: cross-platform 2D game framework
Box2D: 2D physics engine
Bullet : 3D physics engine
GamePlay: cross-platform 3D gaming framework
Lua: embeddable scripting language
SFML/SDL: cross-platform multimedia library.
Skia: Fast 2D rendering engine
25
Gaming Platform
Ÿ  Scoreloop SDK „ 
„ 
„ 
„ 
Integrate Social Gaming Features Solid Analy8cs Cross-­‐pla<orm presence Billing / Mone8za8on feature Ÿ  Payment APIs for in-­‐Game transac8ons 26
BlackBerry on GitHub
• 
• 
• 
• 
• 
Open Source Development Community
Port libraries and frameworks
Create libraries and frameworks
Collaborate and contribute
Work directly with other BlackBerry Platform Developers
blackberry.github.com
27
Game Engines
Ÿ 
Ÿ 
Ÿ 
Ÿ 
Unity Technologies Marmalade SDK ShiVa3D Game Engine with Development tools More Coming! 28
Unity Offer!
Ÿ  Have a Unity PRO License? Get the BlackBerry Plugin for free! „ 
Worth $1.500 Get also a BlackBerry Z10 for Free „ 
hYps://unity3d.com/contest/blackberry „ 
29
Development tools
•  GCC and GDB based tool chain
•  Momentics IDE - Eclipse based C/C++ Development
Tools
•  In-built Application Debugging, Profiling and Memory
Analysis
•  Microsoft Visual Studio plugin
30
Visual Studio Plugin
Ÿ  You can use the BlackBerry Native Plug-in for Microsoft
Visual Studio to develop C and C++ applications for your
BlackBerry 10 device or BlackBerry PlayBook tablet.
31
Links
Ÿ  BlackBerry Na8ve SDK developer.blackberry.com/na2ve -­‐> “Download the Na-ve SDK” -­‐> “Get started with Na-ve SDK” Ÿ  Blackberry Open Source blackberry.github.com 32
Cascades
C++/Qt
What is Cascades?
Ÿ  Easy to use framework for delivering the astonishing user experience and UI Rich set of core UI components „  Built in signature effects „  Pre-­‐packaged interac8on design „  Easy data binding to various data sources (SQL/XML/JSON) „  Ease of integra8on with pla<orm services „  C++ and/or QML/JavaScript® power for the same object model „ 
34
What is Cascades?
35
Out-of-the-box Elegance
36
Cascades and Qt
• 
• 
• 
• 
• 
• 
Mature C++ application framework
Good APIs
Signals and Slots
Many help classes
QML
QtGui Cascades
Cascades
37
Creating UIs
•  Creating UIs in C++ is a lot of fun, but there are easier
and faster ways to describe UI.
•  QML
• 
• 
declarative language to describe trees of Qt objects with
properties (typically user interface)
Looks like JSON
•  Embed JavaScript as signal handlers
•  A different view of the same object model that C++ offers
• 
Easily mixed with C++
•  Preview your QML UI in Cascades Builder
38
Typical Cascades App
JavaScript
based UI logic
QML based UI
structure
QT/C++
Backend
http://developer.blackberry.com
Any Mix Is Possible
JavaScript
based UI logic
QML based
UI structure
QT/C++
Backend
http://developer.blackberry.com
Why Cascades?
•  For Qt Developers….
• 
• 
• 
Cascades replaces Qt Quick, Qt GUI
Cascades Builder replaces Qt Creator
Slightly different QML syntax
•  So, why Cascades???
• 
• 
• 
Cascades UI rendering NOT on the main thread
BlackBerry10 Look and Feel
Advanced placement management of components
41
Hello World in Cascades
import bb.cascades 1.0
Page {
content: Label {
text: "Hello World"
}
}
42
Hello World in Qt
Page* root = new Page;
Label* label = Label::create()
.text("Hello World");
root->setContent(label);
Application::instance()->setScene(root);
43
Cascades IDE
44
Cascades UI Framework
•  Rich collection of in-built controls
•  Some 40+ fully customizable UI controls
•  Action Bar
•  Navigation – Tabs & Back
•  View specific actions
•  Context Menu
•  Item specific actions
45
UI Adaptability - Multiple Form Factors
How to create an adaptable UI?
Ÿ  Built in controls adapt to device type
Ÿ  Layouts, space quota, 9-sliced images, …
Ÿ  Unique (sub)set of assets per configuration
Asset selectors
Based on resolution and/or visual style
assets/ main_screen.qml dialog.qml picture.png icon.png 720x720/ main_screen.qml picture.png Asset selectors
Based on resolution and/or visual style
assets/ main_screen.qml dialog.qml picture.png icon.png 720x720/ main_screen.qml picture.png Asset selectors
Based on resolution and/or visual style
assets/ main_screen.qml dialog.qml picture.png icon.png 720x720/ main_screen.qml picture.png Links
Ÿ  BlackBerry Cascades
„ 
developer.blackberry.com/cascades
Ÿ  Blackberry Open Source
„ 
blackberry.github.com/cascades/samples.html
51
BlackBerry WebWorks
HTML5
BlackBerry10 & HTML5
Ÿ  Unparalleled Standards
Support
Ÿ  Incredible Performance
53
HTML5 and WebWorks
Ÿ  Port your existing Webs to BlackBerry WebWorks
•  HTML5, CSS3, JavaScript
•  Leading in mobile browser benchmarks
•  Allows for cross-platform web development
•  Broadest portability, Native Look&Feel (BBUI.js), any IDE
54
WebWorks for BB10
•  The SDK has been re-written for BlackBerry 10
– 
– 
– 
No longer based on Java or Adobe AIR
It is now based on JavaScript with a C/C++ back end
The packaging process uses node.js
55
Why HTML5 and WebWorks?
Decision guidance
Ÿ  Utilize your existing Web experience
„ 
Re-use lots of cross platform code
Ÿ  Extend with BlackBerry® WebWorks™ platform
to securely access native level functionality
„ 
Provides the best of both worlds
Ÿ  Rich hardware accelerated UI
Ÿ  BB10 apps built with BlackBerry® WebWorks™ behave
like native apps
56
BlackBerry Web Platform
§ 
§ 
§ 
§ 
§ 
Driven by strong Web standards support
Powered by WebKit
HTML5 and CSS3
Flash 11 and WebGL
WebWorks and Cordova
57
Some inspiration: WebGL
http://www.gooengine.com
What can you do with WebWorks?
•  Geolocation
•  Offline mode
•  Storage
•  Audio / Video
•  2D Graphics
•  Advanced forms
•  Invoke
•  Web Workers
•  Notifications
59
How do I get there?
Web Assets WebWorks Tools BlackBerry Applica8ons 60
Custom WebWorks API
•  Build your own APIs
– 
Access native layer functionality
– 
More powerful than just HTML5
– 
E.g. NFC, Clipboard, Barcode, Analytics
•  JavaScript interface for platform code
– 
BlackBerry OS = Java
– 
Tablet OS = AIR
– 
BlackBerry 10 = C/C++
61
HTML5 Emulator - Ripple
•  A multi-platform mobile emulator for testing
– 
– 
– 
– 
– 
Chrome Extension
Render Web content similar to a web browser
Emulate device-specific APIs and capabilities
Web inspector debugging & profiling
Package and sign BlackBerry applications
•  Supported APIs:
– 
– 
– 
WebWorks, WebWorks for Tablet OS
WebWorks for BlackBerry 10
PhoneGap
62
Ripple Extension
63
Web Platform Extras
§  AliceJS library
§ 
CSS3 hardware acceleration
§  WebGL
§ 
3D Graphics, OpenGL ES 2.0
§  Community frameworks
64
bbui.js
•  Designed for use with BlackBerry WebWorks
• 
A web framework that provides a BlackBerry Look
and Feel
•  Framework goals
• 
• 
• 
• 
• 
Follows BlackBerry 10 UI guidelines
Efficient screen management
Focused on performance and memory optimization
Open source and collaborative
Community driven, not officially from BlackBerry
65
bbui.js - Cases
66
Links
Ÿ  SDK + Simulators
„ 
http://developer.blackberry.com/html5
Ÿ  GitHub
„ 
https://github.com/blackberry/BB10-WebWorks-Samples
67
Android Runtime and Packager
BlackBerry Runtime for Android™
Ÿ  Enable Android software stack running on the BlackBerry
10, including
„ 
„ 
„ 
„ 
Dalvik Virtual machine
Graphics and media
Structured data storage, e.g. SQLite®
Device access, e.g. GPS, accelerometer, compass, etc.
Ÿ  Run at full speed directly on the OS kernel
„ 
„ 
Optimized performance; NOT virtualized
Tightly integrated with the underlying OS
Ÿ  Currently (10.1) based on Android 2.3.3 (aka
Gingerbread, Jelly Bean in 10.2)
69
Target Developers
•  Android App Developer
• 
• 
Only here because it is another avenue to sell their application
Heard that BlackBerry had an Android Runtime and thought they
would check it out
•  BlackBerry Java Developer
• 
• 
• 
Decided to invest in Android Java to hit both BlackBerry and
Android devices
Their Java App does not use many/any BlackBerry APIs
Frustrated that we do not support Java runtime on BlackBerry
anymore
70
Compatibility and Limitations
Ÿ  About 70% of all Android apps are compatible today
Ÿ  Not all Android APIs are supported
•  Hardware and OS limitations
Ÿ  Currently major unsupported features include:
•  Bluetooth
•  Google Maps
•  NFC
•  Native Android Code (not supported)
Ÿ  Android Apps are limited to the personal perimeter
Ÿ  Full compatibility list: developer.blackberry.com/android/apisupport/
71
Porting Existing Apps
.apk in
.bar out
Ÿ  4 Tool options to use
• 
• 
• 
• 
Online Conversion Tool – quickest way to get app converted
Eclipse Plug-in – For most Android developers
Command-line Tools – For advanced developers
Graphical AID – very easy to use
72
Links
Ÿ  Where to start
„ 
http://developer.blackberry.com/android
73
Adobe AIR
Love is in the AIR
Adobe AIR
 Free and open source SDK
Ÿ 
Ÿ 
Ÿ 
Ÿ 
Ÿ 
Open Source SDK
Cross
platform
(Mobile
& Desk) mobil
Cross
platfom
for desktop,
3.5 millions of devs
3.5ofmillion
70%
online developers
games built on Flash
Different tools & frameworks
 ~70% online games built with Fla
 Lot of frameworks and tools
Developing with Adobe AIR
Ÿ  Easily adapt and deploy exis8ng content Ÿ  Na2ve BlackBerry® PlayBook™ tablet and BlackBerry 10 component set look and feel Ÿ  Can create hybrid apps Ÿ  Access to na8ve (C/C++)API’s with Adobe® AIR® Na8ve Extensions Ÿ  Lots of great community support Ÿ  Lots of open-­‐source frameworks 76
Some inspiration
Why Use AIR?
Ÿ  AIR Community
Lot of Learning Resources
„  Fast for create games
„  Different Frameworks, Engines
& Libraries
Ÿ  Empowering UX
„ 
„ 
First Class Citizen for BB10
Great Designer-Developer
Workflows
„ 
Creative UI to the limit
„ 
http://developer.blackberry.com
Tools and getting started
Ÿ  Flash Builder 4.6 and 4.7
Powerflasher FDT (Eclipse based)
Ÿ  Adobe AIR SDK with Adobe ActionScript and Adobe Flex
APIs create an engaging user experience
„ 
„ 
unique UI components and predefined skins
listeners for events that are specific to BlackBerry devices
Ÿ  access the features that are unique to mobile devices
„ 
„ 
Accelerometer
Geolocation
Ÿ  you can create AIR Native Extensions (ANE)
79
BlackBerry 10 UI
Ÿ  QNXSkins.ane stores the assets for the skins
„ 
„ 
„ 
Device deployed ANE
Correctly sized assets are stored on the device
Reduces application file size
80
Support
Ÿ  In BlackBerry 10 10.1, Adobe AIR 3.1 is supported
Ÿ  Adobe AIR 3.5 and Stage 3D supported in BlackBerry
10.2
81
Links
Ÿ  SDK + Simulators
„ 
http://developer.blackberry.com/air
Ÿ  GitHub
„ 
https://github.com/blackberry/Samples-for-AIR
82
Built for BlackBerry
What is the Built for BlackBerry Program?
Built for BlackBerry is an app designation
“It signifies to users that an application fully embraces and
delivers the signature BlackBerry 10 experience”
Benefits – BlackBerry World
List View (Search or Top List)
App Details Screen
Feature Screen
Built for BlackBerry Identifier placed
beside star rating
Built for BlackBerry Badge below
screenshots
(touch target)
Touch target directs to Built for
BlackBerry experience screen
Experience the Value of Carousel Placement
230.6%
Increase
39%
Increase
paid downloads
free downloads
Increase
187.9% daily revenue
Source: BlackBerry World Analytics
Supported Platforms
HTML5 BlackBerry®
WebWorks™
Cascades
http://developer.blackberry.com/builtforblackberry
C/C++
Native SDK
Adobe AIR
Built for BlackBerry Evaluation Criteria
User Experience
Performance
Localization
Service Integration
Security
http://developer.blackberry.com/builtforblackberry
Games
http://developer.blackberry.com/builtforblackberry
THANK YOU
Luca Filigheddu
Head of Developer Evangelism EMEA – BlackBerry
@filos