Blackberry res folder naming convention

It is possible to have a folder hierarchy under the /res folder but you must use getClass().getResourceAsStream(path) rather than Bitmap.getBitmapResource() in order to create your resource. This example creates a Bitmap from the path /res/img/hi_res/ui/action_arrow.png: String imagePath = “/img/hi_res/ui/action_arrow.png”; InputStream is = getClass().getResourceAsStream(imagePath); byte[] imageBytes = IOUtilities.streamToBytes(is); Bitmap b = Bitmap.createBitmapFromBytes(imageBytes, 0, imageBytes.length, 1); It’s … Read more

Using preprocessor directives in BlackBerry JDE plugin for eclipse?

Within the eclipse config file (%ECLIPSE_HOME%\configuration\config.ini) make sure the following line exists. osgi.framework.extensions=net.rim.eide.preprocessing.hook With the current BlackBerry plugin (1.0.0.67) config line is added for you. I’m not sure about older versions of the plugin. Also, checkout this Stack Overflow question for more information on the BlackBerry preprocessor. Preprocessor directives supported by the RIM compiler

BlackBerry SQLite database creation: “filesystem not ready”

Richard is right. You need to check for the existence of the filesystem root “store”. There is an extra wrinkle for using SQLite, though. RIM only supports SQLite on eMMC storage. So even if “store” exists, it will only work if the underlying storage is eMMC. Notably the BlackBerry Bold 9650 device, AKA Bold2, has … Read more