37
Bring Your Android Apps to BlackBerry 10 (in minutes) Ranbijay Kumar Developer Relations - BlackBerry

Bring Your Android Apps to BlackBerry 10 in minutes

Embed Size (px)

Citation preview

Page 1: Bring Your Android Apps to BlackBerry 10 in minutes

Bring Your Android Apps to

BlackBerry 10 (in minutes)

Ranbijay KumarDeveloper Relations - BlackBerry

Page 2: Bring Your Android Apps to BlackBerry 10 in minutes

• What is the BlackBerry Runtime for

Android Apps?

• BlackBerry 10 Features

• New Features Demo

• Development Basics

– Converting Existing Android Apps

– Signing and Publishing to BlackBerry World

• Q&A2

Overview

Page 3: Bring Your Android Apps to BlackBerry 10 in minutes

What’s BB Runtime for Android Apps?

► It’s Android Open source

v2.3.3 aka “Gingerbread”

Application Framework

running on top of

Playbook/BB10 OS and

Libraries

► Enables Android apps to

be installed and run inside it

► Deep integration with BB

native framework with the

objective to make Android

app indistinguishable from

native apps

Core Android AppsApplication Framework

Activity Mgr

Package Mgr Resource Mgr

Window Mgr View System

Location Mgr

Notification

Mgr

Core Apps App 1 :.

BlackBerry PB/BB10 OS

Surface Mgr

WebKit

FreeType SGL

SSL

SQLite

OpenGL ES

Media Fwk libc

Java Runtime

Dalvik Virtual Machine

Core Libraries

Library

App 2 App 3

3

Page 4: Bring Your Android Apps to BlackBerry 10 in minutes

4

What is the Android Runtime?

5 Minute Overview

Page 5: Bring Your Android Apps to BlackBerry 10 in minutes

• Android open source version 2.3.3 aka

“Gingerbread” application framework running on

top of BlackBerry PlayBook and BlackBerry 10

• Enables ported Android apps to be installed and

integrate with BlackBerry PlayBook OS and

BlackBerry 10

• Deep integration with BlackBerry native

framework with the objective to make Android

apps almost indistinguishable from native

applications 5

What is the Android Runtime?Overview

Page 6: Bring Your Android Apps to BlackBerry 10 in minutes

• About 70% of all Android apps are compatible today

• Not all Android APIs are supported

►Hardware and OS limitations

• Android Apps are limited to the personal perimeter

►No Enterprise support

• Full compatibility list see:

►http://developer.blackberry.com/android/apisupport

6

What is the Android Runtime?Compatibility & Limitations

Page 7: Bring Your Android Apps to BlackBerry 10 in minutes

BlackBerry 10 (Z10 and Q10)BlackBerry Runtime for Android Apps

• Improved Usability

– Integration with virtual keyboard

– BlackBerry Permission Prompts

– Support for BB10 screen resolution

– Intents invoke core BB10 apps

– Notifications mapped to BlackBerry 10

– Supported multiple form factors

• Improved Compatibility

– PIM APIs

– Telephony APIs

– Push Features

7

► 4.2″ screen

► 1280×768 resolution

► Micro USB

► Micro HDMI

► Bluetooth, WiFi, microSIM

► 3.1″ screen

► 720×720 resolution

► Micro USB

► Micro HDMI

► Bluetooth, WiFi, microSIM

Page 8: Bring Your Android Apps to BlackBerry 10 in minutes

8

BlackBerry 10 Features

Usability and Compatibility

Page 9: Bring Your Android Apps to BlackBerry 10 in minutes

BlackBerry 10 FeaturesImproved Usability

• Text input controls are now

integrated with the BlackBerry

10 virtual keyboard

• Support for notifications– Integrated with BlackBerry Hub and as a splat on

your application icon

• Multimedia sync– Multimedia created using Android apps is visible

to native BlackBerry 10 multimedia applications.

This includes pictures and videos9

Page 10: Bring Your Android Apps to BlackBerry 10 in minutes

BlackBerry 10 FeaturesImproved Usability

• New intent support for

BlackBerry 10 apps and cards

– Share via Email or SMS

– Create Calendar appointments

– Add information to Contacts

– Contact Picker

– Launch links via native Browser

– Dialer Support

– File Picker 10

Page 11: Bring Your Android Apps to BlackBerry 10 in minutes

BlackBerry 10 FeaturesImproved Compatibility

• New API support in BlackBerry

10 Runtime for Android Apps

– Camera API

– Camera Flash API

– Camera AutoFocus API

– In-App Payment API

– C2DM/GCM Support

– Ambient Light API

– Proximity sensor API

– Telephony APIs* (Not all

supported) 11

Page 12: Bring Your Android Apps to BlackBerry 10 in minutes

BlackBerry 10 FeaturesBlackBerry Runtime for Android Apps

• What’s coming with Keyboard

devices?

– Continued support for Android Runtime

– Support for 720x720 screen resolution

– QWERTY keyboard support

12

Page 13: Bring Your Android Apps to BlackBerry 10 in minutes

• Support for location based intents to display maps

• Use WebView + web services (Google, Bing, etc.) to

display map content within apps

• More details on mapping support can be found on

the API Support Page

– http://developer.blackberry.com/android/apisuppor

t 13

BlackBerry 10 FeaturesWant to use Maps?

Page 14: Bring Your Android Apps to BlackBerry 10 in minutes

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.main);

WebView webView = (WebView) findViewById(R.id.mywebview);

webView.getSettings().setJavaScriptEnabled(true);

webView.loadUrl("http://maps.google.com/?ll=36.97,-

122&lci=bike&z=13&t=p");

}

14

BlackBerry 10 FeaturesWant to use Maps?

Page 15: Bring Your Android Apps to BlackBerry 10 in minutes

15

• In-App Payments supported through BlackBerry World

• Use the same Digital Good SKUs used for Item IDs in the

Android payment system

• Couple of items to remember:

– Only one purchase can be made at a time (No

concurrent transactions)

– Refunds are not supported

– Subscriptions are not supported

– Transaction responses are not signed

• http://developer.blackberry.com/android/apisupport

BlackBerry 10 FeaturesWant to use In-App Payments?

Page 16: Bring Your Android Apps to BlackBerry 10 in minutes

16

• Push support for Cloud to Device Messaging(C2DM) and

Google Cloud Messaging(GCM)

• To create a push-enabled Android app, you need to:

– Register with the Push Service

– Create the configuration file

– Specify Push as a required permission in the .bar file's

manifest file

– On the push-initiator server side, format the data to be

sent to BlackBerry application servers instead of

Google application servers

• http://developer.blackberry.com/android/apisupport

BlackBerry 10 FeaturesWant to use Push?

Page 17: Bring Your Android Apps to BlackBerry 10 in minutes

17

Demo

New features

Page 18: Bring Your Android Apps to BlackBerry 10 in minutes

BlackBerry Development Basics

18

Convert, Sign and Submit!

Page 19: Bring Your Android Apps to BlackBerry 10 in minutes

• Tools

– Online Conversion Tool - Quickest way to get

apps converted Free

– Eclipse Plug-in - For most Android developers Free

– Command-line Tools - Advanced development

options Free

– Simulators - BlackBerry PlayBook and BlackBerry

10 Free*

• Basic concepts

– Code Signing Free

– Development Debug Tokens19

Development Basics Simple Process

Android RuntimeAndroid Runtime

Page 20: Bring Your Android Apps to BlackBerry 10 in minutes

20

Converting Existing AppsOnline Conversion Tool

► Select the location of your APK file

► Select the location of your Android SDK folder

Page 21: Bring Your Android Apps to BlackBerry 10 in minutes

21

Converting Existing AppsOnline Conversion Tool

Page 22: Bring Your Android Apps to BlackBerry 10 in minutes

22

Converting Existing AppsOnline Conversion Tool

► Warnings range from mild (level 1) to severe (level 5)

► Apps that receive warnings less than level 2 are considered compatible

► Apps which receive warnings of level 2 or higher are generally considered to be incompatible

Page 23: Bring Your Android Apps to BlackBerry 10 in minutes

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

for ADT

23

► BlackBerry PlayBook, BlackBerry 10 and simulators are just another device target for your existing Android project

► Debugging applications on BlackBerry just like on other Android devices

Converting Existing AppsEclipse Plug-in for Android 1.5

Page 24: Bring Your Android Apps to BlackBerry 10 in minutes

Single Android project can

target both of the BlackBerry

10 form factors within the

same release build.

24

ADT Project Structure

Page 25: Bring Your Android Apps to BlackBerry 10 in minutes

• What’s new in BlackBerry Plug-in for ADT

– Support for Windows 8, Mountain Lion 10.8, Ubuntu

12.04

– Added support for ADT 21.0.1

– Icon size now includes support for xhpdi and hdpi

Android icons

• High resolution icons will be converted to 114x114 for

BlackBerry 10

• xhdpi 96x96 icons will be resized for PlayBook or

BlackBerry 10 if higher resolution icon is not present

– Support for BAR manifest additions 25

Converting Existing AppsEclipse Plug-in for Android 1.5.2

Page 26: Bring Your Android Apps to BlackBerry 10 in minutes

Repackage your APK to a BAR file in 4 easy

steps:1) Check your APK for compatibility

apk2barVerifier

2) Repackage your APK file as a BAR

apk2bar

3) Sign your application

batchbar-signer

4) Deploy your application

blackberry-deploy

26

C:\Program Files\Android\android-sdk\bin>apk2barVerifier HelloWorld.apk

C:\Program Files\Android\android-sdk\bin>apk2bar HelloWorld.apk

C:\Program Files\Android\android-sdk\bin>batchbar-signer HelloWorld.bar author.p12 p12password rdkpassword

C:\Program Files\Android\android-sdk\bin>blackberry-deploy –installApp –device 169.254.0.1 –package HelloWorld.bar–password devicepassword

Development Basics Command-line SDK

Page 27: Bring Your Android Apps to BlackBerry 10 in minutes

• When you run verification on your application,

you might see warnings or errors

• These not errors. Features requiring minimal

OS verison– uses-feature: android.hardware.camera:required minimal OS version=2.1:impact=2

– uses-permission: com.google.android.c2dm.permission.RECEIVE:required minimal OS version=10.0.9:impact=2

– uses-feature: android.hardware.telephony:required minimal OS version=10.0.6:impact=2

• These are features not supported– native-code: armeabi:impact=5

– uses-library: android.test.runner:impact=4

– uses package: com.google.android.maps:impact=3

– targetSdkVersion: 14 is higher than 10:impact=1

27

Development Basics Common Verification Errors

Page 28: Bring Your Android Apps to BlackBerry 10 in minutes

• A code signing key is required to test your app and to

publish your app to BlackBerry World

• They can also be used to generate a debug token for

your BlackBerry PlayBook or BlackBerry 10 Device

• Request code signing keys here

– http://developer.blackberry.com/android/signingkey

28

Converting Existing AppsSign Apps for BlackBerry World

Page 29: Bring Your Android Apps to BlackBerry 10 in minutes

• What do you need to submit your application

– Application for membership Account

– Application and a great app name

– Great description and details about your application

– Create an icon, screen shots, vendor logo

• App Icon – 480x480

• App Screen Shots – 1280x720 or 720x720

• Submit your app!

• developer.blackberry.com/devzone/blackberryworl

d/preparing_your_app_for_blackberry_world.html

Development BasicsSubmit to BlackBerry World

29

Page 30: Bring Your Android Apps to BlackBerry 10 in minutes

• Global marketplace

• FREE to register as a vendor

• FREE to submit apps and upgrades

• 70/30 revenue share

• Credit card, PayPal, carrier billing

• Free and paid apps catalog

• Integrated barcode scanning

30

Development BasicsSubmit to BlackBerry World

Page 31: Bring Your Android Apps to BlackBerry 10 in minutes

• PineLake Communications on Porting Cubifice

to BlackBerry 10

– Ported existing OpenGL

Android application

– Porting process took 1 hour

– 25x more downloads in

BlackBerry World versus

Google Play

31

Success Stories

Page 32: Bring Your Android Apps to BlackBerry 10 in minutes

32

Success Stories

Songza

Page 33: Bring Your Android Apps to BlackBerry 10 in minutes

33

Success Stories

Page 34: Bring Your Android Apps to BlackBerry 10 in minutes

34

Success Stories

Photo Studio

Page 35: Bring Your Android Apps to BlackBerry 10 in minutes

35

Success Stories

Page 36: Bring Your Android Apps to BlackBerry 10 in minutes

For More Information;

• BlackBerry Runtime for Android apps homepage

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

• BlackBerry Runtime for Android apps Roadmap

– http://developer.blackberry.com/android/tools/roadmap/

• Repackaging and Development Tools

– http://developer.blackberry.com/android/tools/

• Getting started tutorial

– http://developer.blackberry.com/android/documentation/gettingstarted.htm

l

36

Page 37: Bring Your Android Apps to BlackBerry 10 in minutes

developer.blackberry.com/android