blackberry

Blackberry res folder naming convention

早过忘川 提交于 2019-12-17 07:55:11
问题 I created a static function like this. public static Bitmap Bitmap(String path) { Bitmap bitmap = Bitmap .getBitmapResource(Display.getWidth() + "/" + path); System.out.println(Display.getWidth() + "" + path); return bitmap; } However, when I called like this, private Bitmap download = Config_GlobalFunction.Bitmap("btn_download.png"); The output gave me FRIDG could not find 320/btn_download.png . In my res folder, I got an folder which was img and inside img got 6 different folders which were

Blackberry res folder naming convention

百般思念 提交于 2019-12-17 07:54:10
问题 I created a static function like this. public static Bitmap Bitmap(String path) { Bitmap bitmap = Bitmap .getBitmapResource(Display.getWidth() + "/" + path); System.out.println(Display.getWidth() + "" + path); return bitmap; } However, when I called like this, private Bitmap download = Config_GlobalFunction.Bitmap("btn_download.png"); The output gave me FRIDG could not find 320/btn_download.png . In my res folder, I got an folder which was img and inside img got 6 different folders which were

How to show more than one location in Blackberry MapField?

混江龙づ霸主 提交于 2019-12-17 07:41:10
问题 I can able to show one location using co ordinates or longtitude and latitude but i dont know how to show more than one location in the blackberry MapField.If is it possible pls share with me how to do this.. 回答1: Same way as How to show our own icon in BlackBerry Map?. Pass an array of Coordinates into custom MapField, define a bitmap for location point and paint it for each Coordinate in custom MapField paint() method. Remember to zoom in/out CustomMapField for best fit of all location

Using preprocessor directives in BlackBerry JDE plugin for eclipse?

有些话、适合烂在心里 提交于 2019-12-17 07:40:17
问题 How to use preprocessor directives in BlackBerry JDE plugin for eclipse? 回答1: 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

BlackBerry SQLite database creation: “filesystem not ready”

霸气de小男生 提交于 2019-12-17 06:51:25
问题 My application takes data from a server and saves it to an SQLite database. This works fine in the 9550 (BlackBerry Storm 2) simulator, but when I run this in any other simulator it gives me this error: file system not ready Code snippet: URI myURI = URI.create("file:///store/MyDataBase.db"); Why is this happening? 回答1: It may be that store is not a mounted and available file system root on the 9550. You should use javax.microedition.io.file.FileSystemRegistry.listRoots() to get an

Image Button in BlackBerry

南楼画角 提交于 2019-12-17 06:13:51
问题 How do I implement an image button in BlackBerry? 回答1: here you go, complete code: import net.rim.device.api.system.Bitmap; import net.rim.device.api.ui.Graphics; import net.rim.device.api.ui.component.ButtonField; /** * Button field with a bitmap as its label. */ public class BitmapButtonField extends ButtonField { private Bitmap bitmap; private Bitmap bitmapHighlight; private boolean highlighted = false; /** * Instantiates a new bitmap button field. * * @param bitmap the bitmap to use as a

How to customize a ListField in BlackBerry?

倾然丶 夕夏残阳落幕 提交于 2019-12-17 02:44:07
问题 I want to customize a ListField in BlackBerry which would be able to list an image and text in a row. How to accomplish this? 回答1: Try something like this: class TaskListField extends ListField implements ListFieldCallback { private Vector rows; private Bitmap p1; private Bitmap p2; private Bitmap p3; public TaskListField() { super(0, ListField.MULTI_SELECT); setRowHeight(80); setEmptyString("Hooray, no tasks here!", DrawStyle.HCENTER); setCallback(this); p1 = Bitmap.getBitmapResource("1.png"

send email programmatically without using EMAIL ID configured in Blackberry device?

匆匆过客 提交于 2019-12-14 04:20:50
问题 I am developing a Social Application in which I need to send email as a request to other users as an Application Invitation. However, my requirement is that I don't want to use the E-mail ID configured in the device. I want to send the Email from the support ID of my firm. I do not want to use the USER'S Email ID. Is this possible? 回答1: I very much doubt that would be possible from the device. If it were then any application could spoof mail from any email address. This would not be a good

how to use ant in eclipse for preprocessing

倖福魔咒の 提交于 2019-12-14 04:06:26
问题 I need to know how to use an an Ant tool for preprocessing in Blackberry. I have a project which needs to be used in 4.6 and 5.0 versions of Blackberry, since JDE4.6 doesn't support preprocessor. I need to know how we can use Ant tool in Eclipse? Any sites or example will do. I referred this site. 回答1: http://www.blackberryforums.com/developer-forum/138210-setup-up-eclipse-blackberry-development.html and http://bb-ant-tools.sourceforge.net/docs This both links will be very helpful to you as a

Get total memory usage in blackberry

99封情书 提交于 2019-12-14 03:59:07
问题 How can I get the Total memory usage by all running applications? Basically I want to find whether the memory usage is greater than 30% or above. 回答1: As suggested by Rafael, you can make use of the Memory class. More specifically, you can use the following which will help you: Memory.getRAMStats().getFree(); Memory.getRAMStats().getAllocated()); If you compare the two mathematically, you can get the percentage from that. 来源: https://stackoverflow.com/questions/7595427/get-total-memory-usage