+ All Categories
Home > Technology > Blackberry_runtime_for_android_apps

Blackberry_runtime_for_android_apps

Date post: 27-Jan-2015
Category:
Upload: droidcon-berlin
View: 107 times
Download: 5 times
Share this document with a friend
Description:
 
Popular Tags:
37
Getting Started with Developing for BlackBerry Runtime for Android Apps Kamel LajiliRIM, Senior Application Development Consultant DroidCon Berlin March 14 th 2012
Transcript
Page 1: Blackberry_runtime_for_android_apps

Getting Started with Developing for BlackBerry Runtime for Android Apps

Kamel Lajili– RIM, Senior Application Development Consultant

DroidCon Berlin

March 14th 2012

Page 2: Blackberry_runtime_for_android_apps

Overview What we will cover in this session

Why repackage for BlackBerry

BlackBerry Runtime for Android Apps - what it is and what it is not

PlayBook development basics

Converting existing applications

Q&A

2

Page 3: Blackberry_runtime_for_android_apps

Repackage Your Android Apps

Page 4: Blackberry_runtime_for_android_apps

Why repackage? BlackBerry App World

Available in 164 markets and growing

Averaging 174 Million downloads per month and growing fast, more than 6 Millions per day!

BlackBerry App World vendor base grows by an average of 190% per year

In EMEA there are Over 3K vendors from 59 countries

4

Page 5: Blackberry_runtime_for_android_apps

Why repackage? BlackBerry App World

Source: Application Distribution Survey, Evans Data, Sept 2011, Vision Mobile 5

“BlackBerry Apps generate 40% more revenue as Android apps“ (Vision Mobile)

Page 6: Blackberry_runtime_for_android_apps

Why repackage? BlackBerry App World

6

“BlackBerry App World delivered the most revenues over the past year, and the most monthly traffic”

“13% of BlackBerry developers make over $100,000 from the App World apps, which is considerably more than Android or Apple developers…”

“19% of BlackBerry App World participants say they had 1,000 or more downloads over the 30 days”

Page 7: Blackberry_runtime_for_android_apps

Why repackage?

Opportunity to increase revenue with minimum (couple of days) effort

in 65% of the cases just repackage the existing APK – no source code or recompilation required

familiar development environment is provided for the cases when modifications to the applications are required – Eclipse plugin on top of Google's ADT plugin

Opportunity for experimenting with different business model and a new customer base

7

Page 8: Blackberry_runtime_for_android_apps

Need a PlayBook to port your

Android Apps?

Page 9: Blackberry_runtime_for_android_apps

What it is?

• It’s an application running on Playbook

• Enables Android applications to be

installed and run on the BlackBerry

PlayBook Tablet

• Android API level 10 – Android v2.3.3

aka “Gingerbread” Application Framework

running on top of the PlayBook OS and

Libraries.

@twitterhandle – 9 QNX Kernel

Libraries

Surface Mgr

WebKit

FreeType

SGL

SSL SQLite

OpenGL ES

Media Fwk

libbionic

Java Runtime

Dalvik Virtual Machine

Core Libraries

Application Framework

Activity Mgr

Package Mgr Resource Mgr

Window Mgr View System

Location Mgr

Notification

Mgr

App1 App2 App3 App4 App5 App6 App7 App8

Page 10: Blackberry_runtime_for_android_apps

A number of cooperating user mode processes that run inside a sandbox

User mode ensures isolation from the OS kernel

Nothing runs as root

Applications requiring special access must have appropriate OS capabilities

Sandbox ensures isolation from other native applications

Data sharing with other native applications is possible in restricted fashion, e.g. photo, music, video, etc.

More secure and robust than other Android devices

10

What it is … Under the hood

Page 11: Blackberry_runtime_for_android_apps

Blends in with the rest of the PlayBook applications

Application Launching/Minimizing/Thumbnail

Installation

Android applications are packaged as a BlackBerry Archive (BAR)

Deploy through BlackBerry® App World™ like other BlackBerry PlayBook tablet apps

Android Media Framework

Graphics

Hardware accelerated OpenGL ES and screen composition.

Notifications

Sensors

Accelerometer, gyroscope, compass, etc.

@twitterhandle – 11

What it is … PlayBook integration

Page 12: Blackberry_runtime_for_android_apps

Networking

Virtual keyboard

Multi-touch – 4-finger multi-touch

Standard public intents for launching native applications

Email, Camera, Photo Gallery, Video Recorder, Browser, Settings, etc.

Standard public intents for launching native file viewers

.pdf, .doc, .xls, .ppt, .png, .jpg, .gif, audio, video, etc.

Shared storage for public data

/sdcard/ -> /accounts/1000/shared/misc/android/

Accessible by other native applications and through USB

@twitterhandle – 12

What it is … PlayBook integration

Page 13: Blackberry_runtime_for_android_apps

Security

BlackBerry Runtime for Android Apps runs in a secure PlayBook OS sandbox that keeps android insulated from the rest of the system. It’s treated as a secure PlayBook application and is subject to the restrictions other native apps are subject to.

Existing Android permission system is retained by BlackBerry Runtime.

Access to system resources are further protected by PlayBook OS via Capabilities that need to be specified in BAR manifest.

@twitterhandle – 13

What it is … PlayBook integration

Page 14: Blackberry_runtime_for_android_apps

Review your UI

1024x600 screen resolution

32 bit color depth

xDPI, yDPI: 169.99, 169.33

Landscape orientation is the default

86x86 application icon

Notifications look different

No add-on Google libraries – Maps, C2DM, In-app billing

No Android Market

Limited Bluetooth support 14

What it is not … Things to be aware of

Page 15: Blackberry_runtime_for_android_apps

Limited Camera integration – invoke but don’t embed

SIP/VOIP

Process sharing

Multiple entry points

Android Home screen/Widgets

Android NDK

Search key

HTTP progressive streaming

15

What it is not … Things to be aware of

Page 16: Blackberry_runtime_for_android_apps

Online resources

Android

http://developer.blackberry.com/android

Documentation:

http://developer.blackberry.com/android/documentation

Where to get signing keys:

https://www.blackberry.com/SignedKeys/

@twitterhandle – 16

Page 17: Blackberry_runtime_for_android_apps

BAR files are the native PlayBook application packaging

What APK files are for Andorid BAR files are for BlackBerry

BAR files contain executables, images, media, etc.

blackberry-deploy: put a packaged app onto the device

The device has to be in development mode

17

PlayBook development basics BAR files

Page 18: Blackberry_runtime_for_android_apps

@twitterhandle – 18

PlayBook development basics Development mode

Page 19: Blackberry_runtime_for_android_apps

@twitterhandle – 19

PlayBook development basics Development mode

Page 20: Blackberry_runtime_for_android_apps

BARs are either signed or unsigned

Unsigned BAR requires Debug Token (except Simulator)

You will need signing keys to develop on Device:

http://developer.blackberry.com/native/signingkey

~1 hour turnaround

You will get

RDK key to sign for distribution

PBDT key to create debug token

20

PlayBook development basics Signing

Page 21: Blackberry_runtime_for_android_apps

Debug tokens allow you to load unsigned applications from a specific author on a specific device

To request a debug token from the command line:

To deploy a debug token on a device

Can also be requested and deployed from within the Eclipse

21

PlayBook development basics Debug tokens

blackberry-debugtokenrequest -cskpass **** -keystore sigtool.p12 -storepass @@@@ -deviceId 0x500C8F54 0x500C8F54

debug.bar

blackberry-deploy -installDebugToken 0x500C8F54debug.bar -device 169.254.0.1 -password &&&&

Page 22: Blackberry_runtime_for_android_apps

22

PlayBook development basics Debug tokens

Page 23: Blackberry_runtime_for_android_apps

Create an account for BlackBerry App World

https://appworld.blackberry.com/isvportal/

Application name, description and icon or logo

Category in which your app should be placed

License type (free, paid or try and buy)

Wireless service providers your app will be available to

Countries where your app should be distributed

Releases and file bundles

Screenshots

Submit signed BAR file

23

PlayBook development basics Submitting to BlackBerry AppWorld

Page 24: Blackberry_runtime_for_android_apps

Online tool

Command line

Eclipse plugin

24

Converting existing applications

Choosing your method

Page 25: Blackberry_runtime_for_android_apps

APK verifier for checking Android compatibility

Five categories on how well an application may run on PlayBook

Impact level 1 (minor non-compliance): Application will run just fine.

Impact level 2: Application may run but some functionality will not work

Unsupported features: Telephony, Camera, SIP, VOIP, etc.

Impact level 3: Application may run but some functionality will not work

Unsupported Google services: e.g. Google Maps.

Impact level 4: Application will most likely not functional

5-way navigation, h/w keyboard, C2DM

Impact level 5 (most severe): Application will not run.

Native libraries, dependency on 3rd party libraries

Eclipse plugin reports compatibility levels as errors and/or warnings

25

Converting existing applications

Compatibility categories

Page 26: Blackberry_runtime_for_android_apps

https://bdsc.webapps.blackberry.com/android/bpaa/

26

Converting existing applications

Using the online tool

Page 27: Blackberry_runtime_for_android_apps

Demo: Converting using the online tool

Page 28: Blackberry_runtime_for_android_apps

1. apk2barVerifier

2. apk2bar

3. blackberry-deploy

28

Converting existing applications

Using the command line tools

Page 29: Blackberry_runtime_for_android_apps

Demo: Converting using the command line tools

Page 30: Blackberry_runtime_for_android_apps

ADT Plug-in for Eclipse + BlackBerry Plug-in for ADT

PlayBook is just another device target for your existing Android project

Debugging applications on PlayBook just like on other Android devices

adb, ddms, jdwp, logcat, etc.

30

Converting existing applications

Using the Eclipse plugin

Page 31: Blackberry_runtime_for_android_apps

1. Install “Eclipse IDE for Java Developers” 3.7 (Indigo)

http://www.eclipse.org/downloads/packages/eclipse-classic-37/indigor

2. Install Android SDK

http://developer.android.com/sdk/index.html

Also use the Android SDK manager to download the Android 2.3.3 platform and related tool and create an Android Virtual Device (AVD)

3. Install ADT Plug-in for Eclipse

http://developer.android.com/sdk/eclipse-adt.html

4. Install BlackBerry Plug-in for ADT

https://bdsc.webapps.blackberry.com/android/downloads/eclipseplugin/

31

Converting existing applications

Using the Eclipse plugin

Page 32: Blackberry_runtime_for_android_apps

Demo: Converting using Eclipse plugin

Page 33: Blackberry_runtime_for_android_apps

Detecting a PlayBook

java.lang.System.getProperty("os.name")

Returns “qnx”

android.telephony.TelephonyManager.getDeviceId()

Returns unique device serial number – e.g. 0000000000429494272343

Same number can be found under Options -> About screen

Browser’s user agent

“Mozilla/5.0 (PlayBook; U; Android 2.3.3; en-us; PlayBook Build/<build_no>) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1”

33

Page 34: Blackberry_runtime_for_android_apps

Recap

BlackBerry Runtime for Android apps enables Android applications to run on PlayBook in a secure and robust environment with optimized performance

BlackBerry Runtime for Android apps enables developers to monetize Android applications on PlayBook

Minimal cost in converting your Android applications

Majority applications (~65%) convert without any source changes

34

Page 35: Blackberry_runtime_for_android_apps

Questions?

Q&A

35

Page 36: Blackberry_runtime_for_android_apps

Online resources

Android

http://developer.blackberry.com/android

Documentation:

http://developer.blackberry.com/android/documentation

Where to get signing keys:

https://www.blackberry.com/SignedKeys/

@twitterhandle – 36

Page 37: Blackberry_runtime_for_android_apps

THANK YOU

Kamel Lajili– RIM, Senior Application Development Consultant, @klajili

DroidCon Berlin

March 14th 2012


Recommended