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.
04-24-2011 04:01 AM
I have read that code is upward compatible meaning that an app written with the 4.5 api should run on later models of the phone. On the other hand I have also seen code like this;
phoneNumber = callInfo.getPhoneNumber();
phoneNumber = callInfo.getDisplayPhoneNumber();
Indicating that different code is needed for different API:s. Could someone elaborate this a bit? Currently
I have the same source for 4.5, 4.6, 4.7, 5 and 6 but at various places I have precompiler statements like the one above.
For world wide distribution it is a bit cumbersome to have to 5 different executables. Or is it possible to code so that the correct API to use is decided at runtime instead of at compile time
Solved! Go to Solution.
04-25-2011 11:43 AM
It's not possible to pick the proper API at runtime (at least not now). If you try to install a COD with APIs from 6.0 on a device running 4.5, it would either not install or crash on starting up. The "upwards compatability" that is talked about is to mean that if you made an app for 4.2.1, it will work on 6.1. Preprocessor is the best way to go since, at least for Eclipse, when you switch API versions, it automatically switches the preprocessor for that API version.
04-25-2011 01:02 PM
I was not fully aware of the upwards compatability so I had precompiler statements at appropiate places to use the most recent api call when coding from 4.5 to 6 I realize now that that is not really needed since the 4.5 code works fine on all of these OS:es (tested). So the problem sort of "went away" at least for the current relesae of the app. There are 2 new releases under way and hopefully it will stay that way.