Getting Started with Developing forBlackBerry Runtime for Android AppsKamel Lajili– RIM, Senior Application Development Co...
OverviewWhat we will cover in this session Why repackage for BlackBerry BlackBerry Runtime for Android Apps - what it is...
Repackage Your Android Apps
Why repackage?BlackBerry App World Available in 164 markets and growing Averaging 174 Million downloads per month and  g...
Why repackage? BlackBerry App World “BlackBerry Apps generate 40% more revenue as Android apps“ (Vision Mobile)Source: App...
Why repackage?BlackBerry App World“BlackBerry App World delivered the mostrevenues over the past year, and the most monthl...
Why repackage? Opportunity to increase revenue with minimum (couple of  days) effort     in 65% of the cases just repack...
Need a PlayBook to port yourAndroid Apps?
What it is? App1    App2       App3      App4    App5    App6      App7        App8                                       ...
What it is …Under the hood A number of cooperating user mode processes that run  inside a sandbox User mode ensures isol...
What it is …PlayBook integration   Blends in with the rest of the PlayBook applications       Application Launching/Mini...
What it is … PlayBook integration   Networking   Virtual keyboard   Multi-touch – 4-finger multi-touch   Standard publ...
What it is …PlayBook integration Security      BlackBerry Runtime for Android Apps runs in a secure PlayBook       OS sa...
What it is not …Things to be aware of Review your UI       1024x600 screen resolution         32 bit color depth       ...
What it is not …Things to be aware of   Limited Camera integration – invoke but don’t embed   SIP/VOIP   Process sharin...
Online resources Android     http://developer.blackberry.com/android Documentation:     http://developer.blackberry.co...
PlayBook development basicsBAR files BAR files are the native PlayBook application packaging     What APK files are for ...
PlayBook development basicsDevelopment mode                              @twitterhandle – 18
PlayBook development basicsDevelopment mode                              @twitterhandle – 19
PlayBook development basicsSigning BARs are either signed or unsigned Unsigned BAR requires Debug Token (except Simulato...
PlayBook development basics  Debug tokens   Debug tokens allow you to load unsigned applications    from a specific autho...
PlayBook development basicsDebug tokens                              22
PlayBook development basicsSubmitting to BlackBerry AppWorld Create an account for BlackBerry App World      https://app...
Converting existing applicationsChoosing your method Online tool Command line Eclipse plugin                           ...
Converting existing applicationsCompatibility categories APK verifier for checking Android compatibility Five categories...
Converting existing applicationsUsing the online tool https://bdsc.webapps.blackberry.com/android/bpaa/                  ...
Demo: Converting using the online tool
Converting existing applicationsUsing the command line tools1. apk2barVerifier2. apk2bar3. blackberry-deploy              ...
Demo: Converting using the commandline tools
Converting existing applicationsUsing the Eclipse plugin ADT Plug-in for Eclipse + BlackBerry Plug-in for ADT     PlayBo...
Converting existing applicationsUsing the Eclipse plugin1. Install “Eclipse IDE for Java Developers” 3.7 (Indigo)      ht...
Demo: Converting using Eclipse plugin
Detecting a PlayBook java.lang.System.getProperty("os.name")     Returns “qnx” android.telephony.TelephonyManager.getDe...
Recap BlackBerry Runtime for Android apps enables Android  applications to run on PlayBook in a secure and robust  enviro...
Questions?             Q&A                   35
Online resources Android     http://developer.blackberry.com/android Documentation:     http://developer.blackberry.co...
THANK YOUKamel Lajili– RIM, Senior Application Development Consultant, @klajiliDroidCon BerlinMarch 14th 2012
Upcoming SlideShare
Loading in …5
×

Blackberry_runtime_for_android_apps

1,130 views
1,064 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,130
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
21
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Blackberry_runtime_for_android_apps

  1. 1. Getting Started with Developing forBlackBerry Runtime for Android AppsKamel Lajili– RIM, Senior Application Development ConsultantDroidCon BerlinMarch 14th 2012
  2. 2. OverviewWhat 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
  3. 3. Repackage Your Android Apps
  4. 4. 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
  5. 5. Why repackage? BlackBerry App World “BlackBerry Apps generate 40% more revenue as Android apps“ (Vision Mobile)Source: Application Distribution Survey, Evans Data, Sept 2011, Vision Mobile 5
  6. 6. Why repackage?BlackBerry App World“BlackBerry App World delivered the mostrevenues over the past year, and the most monthlytraffic”  “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” 6
  7. 7. 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 Googles ADT plugin Opportunity for experimenting with different business model and a new customer base 7
  8. 8. Need a PlayBook to port yourAndroid Apps?
  9. 9. What it is? App1 App2 App3 App4 App5 App6 App7 App8 • It’s an application running on Playbook Application Framework Activity Mgr Window Mgr View System Notification • Enables Android applications to be Mgr installed and run on the BlackBerry Package Mgr Resource Mgr Location Mgr PlayBook Tablet Libraries Java Runtime • Android API level 10 – Android v2.3.3 WebKit OpenGL ES Core Libraries aka “Gingerbread” Application Framework SSL SQLite running on top of the PlayBook OS and Surface Mgr SGL Libraries. Dalvik Virtual Machine FreeType Media Fwk libbionic QNX Kernel @twitterhandle – 9
  10. 10. What it is …Under the hood 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
  11. 11. What it is …PlayBook integration 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
  12. 12. What it is … PlayBook integration 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
  13. 13. What it is …PlayBook integration 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
  14. 14. What it is not …Things to be aware of 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
  15. 15. What it is not …Things to be aware of 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
  16. 16. 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
  17. 17. PlayBook development basicsBAR files 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
  18. 18. PlayBook development basicsDevelopment mode @twitterhandle – 18
  19. 19. PlayBook development basicsDevelopment mode @twitterhandle – 19
  20. 20. PlayBook development basicsSigning 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
  21. 21. PlayBook development basics Debug tokens  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:blackberry-debugtokenrequest -cskpass **** -keystore sigtool.p12 -storepass @@@@ -deviceId 0x500C8F54 0x500C8F54debug.bar  To deploy a debug token on a device blackberry-deploy -installDebugToken 0x500C8F54debug.bar -device 169.254.0.1 -password &&&&  Can also be requested and deployed from within the Eclipse 21
  22. 22. PlayBook development basicsDebug tokens 22
  23. 23. PlayBook development basicsSubmitting to BlackBerry AppWorld 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
  24. 24. Converting existing applicationsChoosing your method Online tool Command line Eclipse plugin 24
  25. 25. Converting existing applicationsCompatibility categories 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
  26. 26. Converting existing applicationsUsing the online tool https://bdsc.webapps.blackberry.com/android/bpaa/ 26
  27. 27. Demo: Converting using the online tool
  28. 28. Converting existing applicationsUsing the command line tools1. apk2barVerifier2. apk2bar3. blackberry-deploy 28
  29. 29. Demo: Converting using the commandline tools
  30. 30. Converting existing applicationsUsing the Eclipse plugin 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
  31. 31. Converting existing applicationsUsing the Eclipse plugin1. Install “Eclipse IDE for Java Developers” 3.7 (Indigo)  http://www.eclipse.org/downloads/packages/eclipse-classic-37/indigor2. 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.html4. Install BlackBerry Plug-in for ADT  https://bdsc.webapps.blackberry.com/android/downloads/eclipseplugin/ 31
  32. 32. Demo: Converting using Eclipse plugin
  33. 33. 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
  34. 34. 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
  35. 35. Questions? Q&A 35
  36. 36. 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
  37. 37. THANK YOUKamel Lajili– RIM, Senior Application Development Consultant, @klajiliDroidCon BerlinMarch 14th 2012

×