Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Development

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

New Contributor
Posts: 2
Registered: ‎03-22-2013
My Device: Blackberry Dev Alpha
My Carrier: verizon
Accepted Solution

Android Runtime Is Slow

Hey we're looking into using the android rntime environment to port our app over. During testing we have noticed that the speed on the BB is laggy compared to android. I was wondering if any developers have any tips/ tricks that we could use in our Android Code to speed up the app to make it run faster on BB? Any and all help uis appreciated. Thanks!

Posts: 12
Registered: ‎01-12-2011
My Device: Playbook

Re: Android Runtime Is Slow

I found a few things that helped speed my app up quite a bit. 


- Don't use a background graphic in your app. Use a solid color.

- set a solid color for the cacheColorHint for your ListViews

- follow the guidline here http://android-developers.blogspot.ca/2009/03/window-backgrounds-ui-speed.html and set the windowBackground to null


I also found that setting getWindow().setFormat(PixelFormat.RGB_565); helped but it can cause things to look really bad expecially with gradients and glows.

Posts: 648
Registered: ‎09-26-2012
My Device: Limited Edition Z10, Playbook 16GB/32GB, Dev Alpha A/B/C
My Carrier: Mobile Vikings

Re: Android Runtime Is Slow

You have two options when you want to port your application from Android (see https://developer.blackberry.com/native/documentation/bb10/porting_from_android_ndk.html). Depending on the type of code you were originally using to develop your Android application you should choose the option to port on the code level (C/C++).

If you are using C/C++ you should use that option when porting. That means that you will be porting your app on the level of the code.
But I guess that most applications (and probably yours too?) will be built in Android Java. And this leaves only the option to really port the whole apk (which is slower).

Next to that, try to optimize the app as much as possible for Android (e.g. using the mentioned by flackery). Code refactoring sometimes helps too.

A like is always appreciated,
but a nomination for BB Elite even more :-)
You can also contact me on Twitter: @ndsmyter
New Contributor
Posts: 2
Registered: ‎03-22-2013
My Device: Blackberry Dev Alpha
My Carrier: verizon

Re: Android Runtime Is Slow

Thanks so much guys these relly helped!