30.04.2013 Views

Running Android Applications on BlackBerry 10

Running Android Applications on BlackBerry 10

Running Android Applications on BlackBerry 10

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<str<strong>on</strong>g>Running</str<strong>on</strong>g> <str<strong>on</strong>g>Android</str<strong>on</strong>g> <str<strong>on</strong>g>Applicati<strong>on</strong>s</str<strong>on</strong>g> <strong>on</strong> <strong>BlackBerry</strong> <strong>10</strong><br />

developer.blackberry.com/android<br />

James Dreher<br />

Applicati<strong>on</strong> Development C<strong>on</strong>sultant<br />

<strong>BlackBerry</strong> Developer Relati<strong>on</strong>s


Overview<br />

BB Runtime for <str<strong>on</strong>g>Android</str<strong>on</strong>g> Apps<br />

Upcoming Releases<br />

C<strong>on</strong>verting Existing <str<strong>on</strong>g>Applicati<strong>on</strong>s</str<strong>on</strong>g><br />

BB Development Basics<br />

BB App World<br />

Q&A<br />

2


What’s BB Runtime for <str<strong>on</strong>g>Android</str<strong>on</strong>g> Apps?<br />

Core Apps App 1 App 2 App 3 ….<br />

Activity Mgr<br />

Package Mgr Resource Mgr<br />

WebKit<br />

Surface Mgr<br />

Library<br />

FreeType SGL<br />

Applicati<strong>on</strong> Core <str<strong>on</strong>g>Android</str<strong>on</strong>g> Framework<br />

Apps<br />

Window Mgr View System<br />

OpenGL ES<br />

SQLite<br />

Media Fwk SSL libc<br />

Locati<strong>on</strong> Mgr<br />

<strong>BlackBerry</strong> PlayBook/BB<strong>10</strong> OS<br />

Notificati<strong>on</strong><br />

Mgr<br />

Java Runtime<br />

Core Libraries<br />

Dalvik Virtual Machine<br />

► It’s <str<strong>on</strong>g>Android</str<strong>on</strong>g> Open source<br />

v2.3.3 aka “Gingerbread”<br />

Applicati<strong>on</strong> Framework<br />

running <strong>on</strong> top of<br />

Playbook/BB<strong>10</strong> OS and<br />

Libraries<br />

► Enables <str<strong>on</strong>g>Android</str<strong>on</strong>g> apps to be<br />

installed and run inside it<br />

► Deep integrati<strong>on</strong> with BB<br />

native framework with the<br />

objective to make <str<strong>on</strong>g>Android</str<strong>on</strong>g><br />

app indistinguishable from<br />

native apps<br />

3


BB Runtime for <str<strong>on</strong>g>Android</str<strong>on</strong>g> Apps,<br />

versi<strong>on</strong> 2.1 Compatibility<br />

About 70% of <str<strong>on</strong>g>Android</str<strong>on</strong>g> apps are fully compatible (no code changes)<br />

Not all <str<strong>on</strong>g>Android</str<strong>on</strong>g> APIs are supported<br />

Time c<strong>on</strong>straints<br />

Certain APIs are used by very few % of the apps<br />

Hardware and native OS limitati<strong>on</strong>s<br />

Unsupported features in PlayBook 2.1<br />

Teleph<strong>on</strong>y NDK Barometer<br />

Bluetooth NFC Proximity sensor<br />

VOIP Google Maps C2DM<br />

4


Want to use Google Maps?<br />

Support for locati<strong>on</strong> based intents to display maps<br />

Use WebView + web services (Google, Bing, etc.) to<br />

display map c<strong>on</strong>tent within apps<br />

More details <strong>on</strong> mapping support can be found <strong>on</strong> the<br />

API Support Page<br />

developer.blackberry.com/android/apisupport<br />

5


Upcoming Releases<br />

PlayBook 2.1 and <strong>BlackBerry</strong> <strong>10</strong><br />

developer.blackberry.com/android<br />

6


PlayBook 2.1 OS<br />

<strong>BlackBerry</strong> Runtime for <str<strong>on</strong>g>Android</str<strong>on</strong>g> Apps<br />

Improved Usability<br />

Multi-Window support<br />

Stability<br />

Improved Compatibility<br />

Camera APIs<br />

Fr<strong>on</strong>t and Rear Camera Support<br />

Video Recording<br />

In-app Payments<br />

<str<strong>on</strong>g>Android</str<strong>on</strong>g> MarketBillingService API is supported<br />

7


<strong>BlackBerry</strong> <strong>10</strong><br />

<strong>BlackBerry</strong> Runtime for <str<strong>on</strong>g>Android</str<strong>on</strong>g> Apps<br />

Improved Usability<br />

Integrati<strong>on</strong> with virtual keyboard<br />

<strong>BlackBerry</strong> Permissi<strong>on</strong> Prompts<br />

Support for BB<strong>10</strong> screen resoluti<strong>on</strong><br />

Intents invoke core BB<strong>10</strong> apps<br />

Notificati<strong>on</strong>s mapped to BB<strong>10</strong><br />

Improved Compatibility<br />

PIM APIs<br />

Teleph<strong>on</strong>y APIs<br />

► 4.2″ screen<br />

► 1280×768 resoluti<strong>on</strong><br />

► Micro USB<br />

► Micro HDMI<br />

► Bluetooth, WiFi, microSIM<br />

8


Highlights for <str<strong>on</strong>g>Android</str<strong>on</strong>g> Runtime Roadmap<br />

PlayBook 2.1 OS<br />

• Multi window support<br />

• Stability<br />

• Camera APIs (Fr<strong>on</strong>t/Rear, Video Recording)<br />

• In-App Payments for <str<strong>on</strong>g>Android</str<strong>on</strong>g> Market<br />

<strong>BlackBerry</strong> <strong>10</strong><br />

• Integrati<strong>on</strong> with virtual keyboard<br />

• <strong>BlackBerry</strong> Permissi<strong>on</strong> Prompts<br />

• Support for BB<strong>10</strong> screen resoluti<strong>on</strong><br />

• Intents invoke core BB<strong>10</strong> apps<br />

• Notificati<strong>on</strong>s mapped to BB<strong>10</strong><br />

• PIM APIs<br />

• Teleph<strong>on</strong>y APIs<br />

9


C<strong>on</strong>verting Existing <str<strong>on</strong>g>Android</str<strong>on</strong>g> Apps<br />

developer.blackberry.com/android<br />

<strong>10</strong>


C<strong>on</strong>verting Existing <str<strong>on</strong>g>Android</str<strong>on</strong>g> Apps<br />

Tools<br />

Online C<strong>on</strong>versi<strong>on</strong> Tool<br />

Eclipse Plug-in<br />

Command-line Tools<br />

Simulators<br />

Basic c<strong>on</strong>cepts<br />

Code Signing<br />

Development Debug Tokens<br />

11


C<strong>on</strong>verting existing <str<strong>on</strong>g>Android</str<strong>on</strong>g> apps<br />

► Opti<strong>on</strong> 1: <strong>on</strong>line packager<br />

developer.blackberry.com/android<br />

12


C<strong>on</strong>verting existing <str<strong>on</strong>g>Android</str<strong>on</strong>g> apps<br />

► Opti<strong>on</strong> 1: <strong>on</strong>line packager<br />

developer.blackberry.com/android<br />

13


C<strong>on</strong>verting existing <str<strong>on</strong>g>Android</str<strong>on</strong>g> apps<br />

► Opti<strong>on</strong> 1: <strong>on</strong>line packager<br />

developer.blackberry.com/android<br />

14


C<strong>on</strong>verting existing <str<strong>on</strong>g>Android</str<strong>on</strong>g> apps<br />

► Opti<strong>on</strong> 2: command-line SDK<br />

Repackage your APK to a BAR file in 4 easy steps…<br />

1) apk2barVerifier<br />

- run a compatibility check <strong>on</strong> your APK file<br />

2) apk2bar<br />

- package your APK file as a BAR file<br />

3) batchbar-signer<br />

- sign your applicati<strong>on</strong><br />

4) blackberry-deploy<br />

- deploy your app<br />

C:\<str<strong>on</strong>g>Android</str<strong>on</strong>g>\android-sdk\bin><br />

apk2barVerifier HelloWorld.apk<br />

C:\<str<strong>on</strong>g>Android</str<strong>on</strong>g>\android-sdk\bin><br />

apk2bar HelloWorld.apk<br />

C:\<str<strong>on</strong>g>Android</str<strong>on</strong>g>\android-sdk\bin><br />

batchbar-signer HelloWorld.bar<br />

author.p12 p12password<br />

rdkpassword<br />

C:\<str<strong>on</strong>g>Android</str<strong>on</strong>g>\android-sdk\bin><br />

blackberry-deploy –installApp –<br />

device 169.254.0.1 –package<br />

HelloWorld.bar<br />

–password devicepassword<br />

15


C<strong>on</strong>verting existing <str<strong>on</strong>g>Android</str<strong>on</strong>g> apps<br />

► Opti<strong>on</strong> 2: <strong>BlackBerry</strong> Plug-in for ADT<br />

ADT Plug-in for Eclipse + <strong>BlackBerry</strong> Plug-in for ADT<br />

PlayBook is just another device target for your existing <str<strong>on</strong>g>Android</str<strong>on</strong>g> project<br />

Debug applicati<strong>on</strong>s <strong>on</strong> PlayBook just like <strong>on</strong> other <str<strong>on</strong>g>Android</str<strong>on</strong>g> devices<br />

adb, ddms, jdwp, logcat, etc.<br />

Use the same IDE & project,<br />

BB plug-in adds the functi<strong>on</strong>ality<br />

to test/debug/package against<br />

<strong>BlackBerry</strong> devices<br />

16


<strong>BlackBerry</strong> Development Basics<br />

developer.blackberry.com/android<br />

17


PlayBook/BB<strong>10</strong> development basics<br />

BAR files<br />

A BAR file is the native PlayBook/<strong>BlackBerry</strong> <strong>10</strong> applicati<strong>on</strong> package<br />

What APK files are for <str<strong>on</strong>g>Android</str<strong>on</strong>g> BAR files are for <strong>BlackBerry</strong><br />

BAR files c<strong>on</strong>tain executables, images, media, etc.<br />

blackberry-deploy: load a packaged app <strong>on</strong>to the device<br />

The device has to be in development mode<br />

18


PlayBook/BB<strong>10</strong> development basics<br />

Development mode<br />

19


<strong>BlackBerry</strong> App World<br />

developer.blackberry.com/android<br />

20


<strong>BlackBerry</strong> App World<br />

Global marketplace<br />

FREE to register as a vendor<br />

FREE to submit apps and upgrades<br />

70/30 revenue share<br />

Credit card, PayPal, carrier billing<br />

Free and paid apps catalog<br />

Integrated barcode scanning<br />

21


<strong>BlackBerry</strong> App World<br />

<strong>BlackBerry</strong> developers make m<strong>on</strong>ey!<br />

13% of <strong>BlackBerry</strong> developers have made over<br />

$<strong>10</strong>0,000 from App World (Evans Data Group)<br />

App World generates 40% more revenue per app than<br />

Google Play (Visi<strong>on</strong> Mobile)<br />

More paid downloads than Google Play (PaidC<strong>on</strong>tent.org)<br />

43% more downloads per app than Apple App Store<br />

(Research2Guidance)<br />

Source: GigaOm<br />

22


Success Stories From <str<strong>on</strong>g>Android</str<strong>on</strong>g> Developers<br />

developer.blackberry.com/android<br />

23


Case Study – Sec<strong>on</strong>d Gear Games<br />

Sec<strong>on</strong>d Gear Games<br />

https://developer.blackberry.com/whyblackberry/sec<strong>on</strong>dgear<br />

Ported <str<strong>on</strong>g>Android</str<strong>on</strong>g> game to PlayBook.<br />

Translated and re-compiled in less than 1 hr.<br />

No noticeable performance differences.<br />

IDE—1 project and comm<strong>on</strong> code-base for 2<br />

platforms.<br />

Increase discoverability in AppWorld.<br />

<strong>BlackBerry</strong> games generating more revenue.<br />

24


Case Study – Pine Lake<br />

Pine Lake Communicati<strong>on</strong>s Inc.<br />

https://developer.blackberry.com/whyblackberry/cubifice<br />

Re-packaged <str<strong>on</strong>g>Android</str<strong>on</strong>g> game app (Cubifice) to BB<strong>10</strong><br />

Installed Eclipse tools and ported game ~ 1 hour<br />

500+ downloads in first 2 days.<br />

25X more than <str<strong>on</strong>g>Android</str<strong>on</strong>g> Market.<br />

25


Success Stories<br />

26


Important Links<br />

<strong>BlackBerry</strong> Runtime for <str<strong>on</strong>g>Android</str<strong>on</strong>g> apps<br />

homepage<br />

developer.blackberry.com/android<br />

<str<strong>on</strong>g>Android</str<strong>on</strong>g> Repackaging Tools<br />

developer.blackberry.com/android/tools<br />

<strong>BlackBerry</strong> Developer Blog<br />

devblog.blackberry.com<br />

Twitter Support Channels<br />

@<strong>BlackBerry</strong>Dev<br />

@james_dreher<br />

► 4.2″ screen<br />

► 1280×720 resoluti<strong>on</strong><br />

► Micro USB<br />

► Micro HDMI<br />

► Bluetooth, WiFi, microSIM<br />

27


Q&A<br />

developer.blackberry.com/android

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!