java-me

Blackberry ListField: Maintaining row focus during an update

雨燕双飞 提交于 2019-12-13 06:02:00
问题 After using the code below to refresh a ListField containing data returned in an xml web service. But after refresh or on refresh it sets focus to the first row in the ListField. I don't want that. I want it to maintain its current focus after refresh so that a user wont even know that there was a refresh. protected void onUiEngineAttached(boolean attached) { if (attached) { // TODO: you might want to show some sort of animated // progress UI here, so the user knows you are fetching data

JSON JAVA client to connect server and receive data

本小妞迷上赌 提交于 2019-12-13 05:40:21
问题 I have a sinatra server, I need the client in java that receive data using json from sinatra. I have no idea how to do it. 回答1: Use Jersey client to get JSON data from server. Use Gson to convert it from JSON to your objects. 来源: https://stackoverflow.com/questions/5233175/json-java-client-to-connect-server-and-receive-data

Unification of .jar and .jad files in a J2ME application

余生长醉 提交于 2019-12-13 05:36:28
问题 currently, I am developing a J2ME application for mobiles using LWUIT library. The build result of my project includes a .jar file along with a .jad file. I wonder, is there any way to unify these to files into a single .jar file? Why some properties of my application should be mentioned in a single (and simple) .jad file instead of the METAINF/manifest.mf file of the jar file? It really makes the deployment process more difficult. 回答1: There are historical reasons for the separate .jar and

LWUIT : issue in showing arabic words ?

放肆的年华 提交于 2019-12-13 05:13:50
问题 Hi i have problam in showing arabic words in LWUIT , the arabic words characters are separated and reversed , but it`s work true on nokia , how can i slove this problem ? thanks 回答1: In bitmap fonts Arabic glyph shaping doesn't work because of the unique properties of the language. You need to use system fonts (which aren't the default in some of LWUIT's themes), in system fonts support for Arabic is up to the device/simulator not all of which support bidi/shaping properly. Notice some older

Create library in j2me

谁都会走 提交于 2019-12-13 04:07:44
问题 I am a beginner in j2me.I want to create a library(jar) in j2me. Could anyone guide me regarding the same. 回答1: Just simple steps you have to follow. Create New Project Without any midlet. Create your classes which you want in library. Compile all classes. Right click on Project & Select Properties. Click on creating Jar & Give name for Jar & Jad Now Clean & Build Your Project. Your Library ready to use in jar file. 来源: https://stackoverflow.com/questions/9495340/create-library-in-j2me

Can I create a dialog box as seen in Blackberry using pure J2ME package

佐手、 提交于 2019-12-13 03:49:21
问题 I know we Alert is used as Pop up box in j2me but can I create a pop up as good looking as dialog box of Blackberry using pure j2me packages? Or I need to customize using Canvas class? Is there a dialog box in j2me? if yes can I get an example? 回答1: Dude, Just create one canvas with background image transparent and use another images for same like dialog box(images create from adobe Photoshop) , so this canvas you can use it anywhere in application. thanks 回答2: use d.show(); show method is

Warning: org.json.me.JSONArray: can't find referenced class java.lang.StringBuilder

半世苍凉 提交于 2019-12-13 03:49:10
问题 Warning: org.json.me.JSONArray: can't find referenced class java.lang.StringBuilder I have checked all java file of json.me but in that no java.lang.StringBuilder is used I got this warning when I am compiling my j2me project. How to remove this warning from project. I got this json.me from this link Download link of json.me Please give me solution about that. Thanks 回答1: java.lang.StringBuilder is found in the JDK. I think StringBuffer is available in Java ME. Use that instead. Also, I

Local database in j2me midp 1.0

杀马特。学长 韩版系。学妹 提交于 2019-12-13 00:36:12
问题 I am developing one application in J2me MIDP 1.0 It requires local database management. I have heard about recordStore but can we use it for permanent storage? 回答1: Yes, your application can store data using a RecordStore, and you can get it back later even if the application or the phone has been shut down. EDIT: One example I found: http://www.roseindia.net/j2me/read-write-midlet.shtml 回答2: RecordStore, or more generally, MIDP RMS API is intended just for use for permanent storage : ...The

Improve accuracy of my timer thread

自闭症网瘾萝莉.ら 提交于 2019-12-12 23:30:54
问题 Below I have a thread that updates a 'clock' label once per second. Once the thread reaches 600 (10 mins) the timer stops. The thread seems to trail by approx five seconds every minute. So when val = 60, in actuality 65 seconds may have elapsed. I'm using midp so I dont think I can introduce any api's to help me with this task. How can I improve on the accuracy below class? I think whats slowing it down is the method convertValToTimerString, is there a better way of converting the current

Check blackberry is connected via USB

北城余情 提交于 2019-12-12 20:13:58
问题 I am doing an application which access the SD/Media card to display its images. But when device is connected via USB I cant access the media card. If thats the case, I want to show a message to user asking him to disconnect device form computer. How can I programatically check that SDCard is accessible or not ? How can I check whether the device is connected to computer via USB? Thanks. 回答1: I am not sure about your second question about checking whether the device filesystem is mounted via