Developing Android Apps for BlackBerry 10 JAM854 Mike Zhou- Developer Evangelist, APAC Nov 30, 2012
Overview What is the BlackBerry Runtime for Android Apps? Releases and Features New Features Demo Development Basics Converting Existing Android Apps Signing and Publishing to BlackBerry World Q&A 2
What is the Android Runtime? 5 Minute Overview 3
What is the Android Runtime? Overview Android open source version 2.3.3 aka Gingerbread application framework running on top of BlackBerry PlayBook and BlackBerry 10 OS Enables ported Android apps to be installed and operate on BlackBerry PlayBook OS 2.0+ and BlackBerry 10 Deep integration with BlackBerry native framework with the objective to make Android apps indistinguishable from native applications 4
What is the Android Runtime? Compatibility & Limitations About 65-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 Full compatibility list see: http://developer.blackberry.com/android/apisupport 5
Why should you repackage? 65% of the existing Android applications require no change Monetize on BlackBerry platform BlackBerry apps are downloaded 43% more often than the same app on Apple App Store and 48% than on Android Market Developers selling apps through BlackBerry World make significant more money than other app stores. 13% BlackBerry developers have made over US $100,000 6
Releases and Features BlackBerry PlayBook and BlackBerry 10 7
Native Integration Graphics Hardware accelerated OpenGL ES and screen composition Media Framework Multi-touch Sensors Accelerometer, gyroscope, compass, etc. Networking Virtual Keyboard UX / Home Screen Application Launching/Minimizing/Thumbnail, Notifications, etc 8
Native Integration (Cont ) Implicit Intents with launching applications Email, Camera, Photo Gallery, Video Recorder, Settings, etc. Implicit Intents with launching 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 Installation Android application is packaged as a BlackBerry Archive (BAR) Deploy through BlackBerry World like other BlackBerry 10 apps 9
Releases and Features BlackBerry Runtime for Android Apps 10
Releases and Features BlackBerry 10 Improved Usability Integration with new virtual keyboard Multi-Window support Support for notifications Intents invoke core BlackBerry 10 apps Compose email, Contacts, Calendar, Browser Improved Compatibility Camera API In-app Payments Telephony APIs 11
Releases and Features Want to use Maps? 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/apisupport 12
Releases and Features Want to use Maps? @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"); 13
Demo New features: Multi-Window, Camera, Mail, Calendar 14
Development Basics Convert, Sign and Submit! 15
Development Basics Simple Process Tools Online Conversion Tool - Quickest way to get apps converted Eclipse Plug-in - For most Android developers Command-line Tools - Advanced development options Simulators - BlackBerry PlayBook and BlackBerry 10 Basic concepts Code Signing Development Debug Tokens 16
Converting Existing Apps Online Conversion Tool Select the location of your APK file Select the location of your Android SDK folder 17
Converting Existing Apps Online Conversion Tool 18
Converting Existing Apps Online 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 19
Converting Existing Apps Eclipse Plug-in for Android ADT Plug-in for Eclipse + BlackBerry Plug-in for ADT PlayBook and BlackBerry 10 are just another device target for your existing Android project Debugging applications on BlackBerry just like on other Android devices Supports ADT 20.0.3 20
UX Consideration Resize your application icon to 86x86/114x114 Requirement for icons in the PlayBook/BlackBerry 10 home screen Default (natural) orientation Screen size and density 1024x600/1280x768/720x720 Check for new update Bad UX for prompting users for update or to launch Android Market Let BlackBerry World do the update check for you About and Version Remove Android related descriptions 21
Development Basics Command-line SDK 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 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 blackberry-deploy 22
Development Basics Sign Apps for App World 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 Dev Alpha Request code signing keys here http://developer.blackberry.com/android/signingkey 23
Development Basics Submit to BlackBerry World 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
Success Stories PineLake Communications on Porting Cubifice to BlackBerry 10 Ported existing OpenGL Android application Porting process took 1 hour 25x more downloads in App World versus Google Play 25
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.html 26
And a few Quick Notes Download the Code Hunt App at the desk in the Social Media Lounge and join the NFC scavenger hunt!! Have more questions? Visit Ask the Experts at noon today by the coding lounge in the Jam Space. Don t forget to fill out the Conference Survey at the Registration Desk to claim a free gift! 27
THANK YOU JAM854 Mike Zhou- Developer Evangelist, APAC Nov 30, 2012