java-me

Catching Throwable in Blackberry Java: Good Idea?

允我心安 提交于 2019-12-02 12:39:54
I often see catch clauses for Throwable in Blackberry documentation, such as the Network API docs . My sense is that this is not generally a good practice in Java. Is there a reason for this in Blackberry programming? Does it have to do with stack trace generation for Throwables? Michael Donohue When you catch Throwable in a BlackBerry app, not only does it preserve the stack trace, it saves that stack trace in the device event log. There is no way for an app to get a stack trace itself , so unfortunately you can't automatically collect stack traces. To view the stack trace, you pull up the

Wrap AutoCompleteField List Item

人盡茶涼 提交于 2019-12-02 12:24:43
My apps has AutoCompleteField that hold long text more than 100 Characters, if I use regular AutoCompleteField I cant read the rest of data. How can I make the text wrap into 2 or more lines in the autocompletefield options ? I try using '\r'+'\n' and '\n', its not giving new line. setting it size and also set row height doesnt give me the result I wanted AutoCompleteField autoCustomer = new AutoCompleteField(custList, style); autoCustomer.getListField().setSize(20); autoCustomer.getListField().setRowHeight(100); If I was you I would override drawListRow and draw the text using drawText which

Reading SMS from inbox in j2me

非 Y 不嫁゛ 提交于 2019-12-02 12:16:31
问题 I am using j2me technology. My application is for sending and receiving sms. Sender can not send sms on specific port and sms always goes to inbox. Is it possible to read sms from inbox in j2me? 回答1: No you cannot read SMS from inbox in J2ME. However you can do so using AT commands as I described in this answer. 回答2: You can not read SMS from Inbox directly. For reading SMS from Inbox you need APIBridge.jar . Using this .Jar file you can read the SMS from inbox too. For Sending SMS on a

Image in button - j2me

让人想犯罪 __ 提交于 2019-12-02 11:04:50
问题 I am trying to build a simple menu-based GUI with J2ME. The menu entries are currently objects of classes derived from the class Button. Is there any way I can: Replace the text in the button and have an image show instead, sort of an icon? Make the text and image appear side by side on the same menu bar. If my question is not clear, please let me know and I will edit it. 回答1: You can create your own Item that looks like a button by extending the CustomItem class. This is a working MIDlet

what are the steps required to run a blackberry application created for the blackberry device?

家住魔仙堡 提交于 2019-12-02 10:41:30
I created a BlackBerry application using java-me and the BlackBerry specific API. It works fine on the BlackBerry simulator. I want to know how I can deploy this application to a BlackBerry device. From the documentation I found that some code signing is required to run a BlackBerry application on a device. What is this meant for? Do all applications required this code signing? and what are the steps to build my application to run on a BlackBerry device? Dinesh Sharma There are basically two ways to install a Blackberry app on a device: Over The Air (OTA) using Desktop Manager There are

How to access Main Application from alternate entry point on Blackberry?

淺唱寂寞╮ 提交于 2019-12-02 09:49:24
问题 In my app, I have used one alternate entry point to check time. If smartphone go to the time I set here, it will push one screen (ex Screen1) in my main app. public static void main(String[] args) { MyApp theApp = new MyApp(); if ( args != null && args.length > 0 && args[0].equals("autorun") ) { theApp.enterEventDispatcher(); } else { theApp.pushScreen(new MyScreen()); theApp.enterEventDispatcher(); } } in Screen1 have some button (ex New button), generally when I run my app and click "New

HashTable to Lwuit Table

萝らか妹 提交于 2019-12-02 09:37:06
Hashtable iHashtable=new Hashtable(); iHashtable.put("Name", "Jhon"); iHashtable.put("Address","India"); Enumeration iEnumeration=iHashtable.keys(); while(iEnumeration.hasMoreElements()) { Object iresult1=iEnumeration.nextElement(); String iresult2=(String) iHashtable.get(iresult1); System.out.println(iresult1); System.out.println(iresult2); My problem is I want to put the value at LWUIT table dynamically using the HashTable key and value,here is iresult1 and iresult2,using the key and value I want to create the LWUIT table where the value will be shown in the following form. Name Jhon Address

Why isn't J2ME able to create recursive directory creation?

ⅰ亾dé卋堺 提交于 2019-12-02 09:36:17
I want to create recursive directories ( for example : Connector.open("file:///Phone:/folder_1/folder_2/", Connector.READ_WRITE); ). The problem is that the two folders , here folder_1 and folder_2, are not mentioned explicitly but instead there is only one String parameter provided from a method. For example : private void myMethod(String path) { fcDir = (FileConnection) Connector.open("file:///Phone:/"+path+"/", Connector.READ_WRITE); ... } And in runtime the two folders are not created ! So I must create separately two FileConnection in order to create the two folders ! So why J2ME is not

Which library is used to access the Gmail emails using J2ME?

五迷三道 提交于 2019-12-02 08:24:56
i want to develop gtalk application for the mobile please tell me the name of library that is used to access the gmail account thr J2ME Your Question title says you want to access gmail emails , but in the description it says to develop gtalk application . If you are looking for gtalk client development check out the following resources Why you need to develop gtalk client for Mobiles , There is already a Plenty of gtalk . To learn you can try with Open Source Application to get started . MGtalk : Google Talk for mobile project .Jabber client for j2me midp 2.0 platform, supports some Google

Blackberry: Kill an application

旧城冷巷雨未停 提交于 2019-12-02 08:20:40
问题 I want to kill an running application in blackberry, just like as task manager. Is there is any way to do that or any API available? Thanks in advance. 回答1: call this method to kill a UiApplication.... public void killApp() { System.exit(0); } 回答2: As per other forums, below are the information I found. Try this if it helps you First Way: you might have to just do a hard boot. take the battery out if all fails. Second Way: Stop a job that is running 1. In the BlackBerry® Administration