java-me

How to handle network thread calls and wait progress in J2me?

落花浮王杯 提交于 2019-12-11 01:57:04
问题 In my project I have created some network calls to the servlets in separate Thread where before that thread starts I show a spinner as wait progress. Until that network Thread finishes the waitprogress is displayed on to the screen and when I receive response from the server I have to explicitly call progress bar's dispose() method to dispose that progress bar. So, This is bit complicated whenever I make calls establishing GPRS connection while network strength goes down there I found

Copy a file from PDA to PC via USB in java

*爱你&永不变心* 提交于 2019-12-11 01:53:29
问题 In my application I want to copy a file from PDA to PC via USB, using Java. But I don't have any idea about how to do this and what API to use for that? 回答1: You need to use RAPI in order to do this. In order to access the RAPI dll from Java you can either use JNI or a library like this NativeCall. 回答2: I have post describing how to do this in .NET, although it doesn't directly solve your problem it does demonstrate which methods to use in RAPI and how to use them. http://christian-helle

Shortest Path Algorithm : Uniform distances from one point to adjacent points

[亡魂溺海] 提交于 2019-12-11 01:44:58
问题 I am trying to develop an algorithm wherein I have a Location Class. In each class, I create a list of its adjacent Locations. I want to know, how can I get the shortest path from one Location to another. I am trying to look for different algorithms but it seems that they doesn't answer my problem. For example, I have a point A and I want to go to point B, A - - C - - H - - J | F- - K- -B My idea for this is if B is in the List of adjacent locations of A, then that is the shortest path. If

How do i keep a caught exception from reporting as uncaught in a blackberry app?

て烟熏妆下的殇ゞ 提交于 2019-12-11 01:41:39
问题 Edit: this applies to simulators only, but i would still like to know if there is a resolution. I have some code in a blackberry application that catches an exception at some point, does some handling in the catch block then rethrows the exception, which is caught higher up on the call stack. However even though i do catch it later on, i still see an error message displayed on the simulator, along with a jvm 104 error in the device logs. Is there something else i need to do to suppress this

Application Details on Blackberry

僤鯓⒐⒋嵵緔 提交于 2019-12-11 01:20:20
问题 I want to develop an application which gets the details of other installed applications on Blackberry. Is there any possibility? 回答1: Yes, you can use CodeModuleGroupManager.loadAll() to get a list of all applications installed on the device. 来源: https://stackoverflow.com/questions/3874315/application-details-on-blackberry

Read JSON data returned by google maps

旧城冷巷雨未停 提交于 2019-12-11 01:02:16
问题 In my app I use the BlackBerry API to get latitude and longitude. I would like to do reverse geocoding using Google maps by creating an http connection. How do I parse the data, and then read a specific element, such as the address? An example URL: http://maps.google.com/maps/geo?json&ll=9.6,73.7 Gives response: { "name": "9.600000,76.760000", "Status": { "code": 200, "request": "geocode" }, "Placemark": [ { "id": "p1", "address": "Kanjirappalli Elikkulam Rd, Kerala, India", "AddressDetails":

Blackberry - Custom EditField Cursor

半世苍凉 提交于 2019-12-11 00:35:49
问题 I am creating a search box for my BlackBerry project, but it looks like BlackBerry doesn't have an API for creating a single line EditField. I have created a custom field by extending BasicEditField and overriding methods like layout and paint. In the paint function body, I am drawing a rectangle with getPreferredWidth() and getPreferredHeight(). But the cursor shows up at the default top-left position in the EditField. Can anybody tell me how I can draw the cursor where my text is? i.e. in

servlet communicate with J2me Project?

Deadly 提交于 2019-12-11 00:17:19
问题 i am working with Eclipse to develop a application in J2ME.In This application i am using a servlet called HitServlet and a J2me Class HitMIDlet. I want to run this project using Eclipse.But i do not what is the directory structure and how i make directory structure. I am alredy configure J2ME plugin and Tomcat in my eclipse. But i do not what is the directory structure of my classes in my eclipse. To get the proper out put. I want when i run j2me class(HitMIDlet) it hit the servlet

How can I send a picture in Java ME?

倾然丶 夕夏残阳落幕 提交于 2019-12-11 00:16:44
问题 How can I send a picture in Java ME ? Maybe using base64 decode and the send in post form via http request 回答1: I think you looking for this image base64 encoding in J2me 回答2: Yes , I'm use that to send the base64 ,putting in // write your picture data to os os.write (data); where data = String with a base64 image , the problem is that i don't have a base64 library that works in java and asp in the same way. 回答3: Have you considered using a "multipart/form-data" encoding type? If you so, then

Database query j2me including criterias

a 夏天 提交于 2019-12-11 00:10:36
问题 I am creating an application with J2ME. for connecting with database i am using RecordStore. so to get a record i need to write as follow: public boolean SearchRecord(String Rec, int pos ) { String [] data = getRecordData(); Rec = Rec.substring(0,pos); for ( int i = 0 ; i < data.length ; i++ ) { data[i] = data[i].substring(0, pos ); if ( Rec.toString().trim().equals(data[i].toString().trim()) ) { data = null; // System.gc(); return true; } } data = null; // System.gc(); return false; } This