java-me

JDBC support on J2ME

流过昼夜 提交于 2019-12-02 06:33:47
Currently I am trying to run an existing java application on a Windows Mobile 6.1 device. The java application had been developed for server side and uses JDBC. My problem is that the Java application uses the java.sql.DriverManager which is not supported either by J9 runtime or by any CDLC/CDC implementation. After doing a lot of research it seems that there is not a standard way to do that. The JSR 169 does not support this class as well. So, I was wondering whether any of you have similar problems and if you have to mention any appropriate software stack that basically support the java.sql.

Doing a phone call in LWUIT

我的梦境 提交于 2019-12-02 05:57:28
问题 I have a textfield with phone number. All I want to do is when the textfield is focused and call button is pressed, application must be paused and call should be made to the phone number of the textfield using platformRequest API. I want to do it in lwuit. Can anyone suggest a idea how to do this? Sample code would be appreciated. 回答1: Also you can do without extend MIDlet using this: String telNo = "tel no"; Display.getInstance().execute("tel:" + telNo); 回答2: Your main class should extends

HttpConnection - javax.microedition, returning -1 for getLength() method

不想你离开。 提交于 2019-12-02 05:54:47
I am trying to program a very simple Mobile Application (J2ME) in java. The idea is to access a website via URL input and read the contents of the website into a buffer. Here's the problem. This works perfectly fine for some URL's but not others? The example below (wikipedia) works fine. But take "http://java.com/en/about/" as an example and the "HttpConnection hc" returns -1 for getLenght() so there is no content to read into the buffer? Here's my code: String url = "http://en.wikipedia.org/wiki/RSS"; //Sets up HttpConnection and InputStream using the URL variable HttpConnection hc = null;

Best Practice for killing a JavaME 1.2 thread?

北战南征 提交于 2019-12-02 05:46:49
问题 Question: I'm interested to know the best practice for killing a long standing operation that is running as a background thread (lets call this thread WorkerThread ) in Java 1.2. Scenario Specifically, I'm developing an application for Blackberry devices whereby I make a HTTP connection. Big picture: a URL request if forwarded to a background thread ( WorkerThread ), the thread makes the request and returns the result using a call back. Scenario Details Now there exists a situation where at

JME: How to get the complete screen in WHITE without buttons, etc etc

大兔子大兔子 提交于 2019-12-02 04:47:46
Please have a look at the following code First, Please note I am a 100% newbie to Java Mobile. In here, I am making the light on and vibrate on when user click the button. However, I really wanted to create a SOS application which turn the whole screen into white, and go to black, like that, in the thread. I guess I didn't achieve that by this app because even the lights are on, the buttons are still there. I tried to turn the "Form" color to "white" but it seems like JME has no "Color" class. import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class Midlet extends

How to read files from phone memory and memory card in J2ME

邮差的信 提交于 2019-12-02 04:18:37
I am trying to create a music player in J2ME. I want to read all mp3 files from phone memory and memory card and add it to list. How to retrieve these .mp3 files? Read this document for go through files and folders for reading files in memory card, In many device you can search by E:\ and for phone memory you can search by C:\ See following links for help http://www.java2s.com/Code/Java/J2ME/FileConnection.htm http://www.coderanch.com/t/230849/JME/Mobile/file-browse-ME 来源: https://stackoverflow.com/questions/6798404/how-to-read-files-from-phone-memory-and-memory-card-in-j2me

Reading SMS from inbox in j2me

我是研究僧i 提交于 2019-12-02 03:55:29
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? funkybro No you cannot read SMS from inbox in J2ME. However you can do so using AT commands as I described in this answer . 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 particular port, try this Sending/Receiving SMS from MIDlets The API Bridge package includes a server

Common Signing tool for java mobiles

≡放荡痞女 提交于 2019-12-02 03:33:53
Can anyone tell me what is the common signing tools used by almost all java mobile vendors like Samsung, Sony, Nokia, Micromax, Moto and so on. AFAIK, Thawte , Verisign and Java verified supports most of the devices. But all are cost. Once I was chatted with Thawte and Verisign technical team for this purpose. They said most of the devices will support after signing the application. But they don't have supported mobile model list. Better you can go with Thawte. 来源: https://stackoverflow.com/questions/6649215/common-signing-tool-for-java-mobiles

j2me - How to create image in jpg format?

匆匆过客 提交于 2019-12-02 03:09:55
问题 My j2me application must take a photo, edit it a little and save it somewhere (or send to server). Camera return me bytes of an image in jpg format, but after I create an Image object from it (using Image.createImage() ), I could not pack it back to jpg. Is there any jpeg encoders for j2me? I found one written in j2se, but it uses j2se-specific classes. 回答1: This can be done! Even without any proprietary APIs or libraries. This can be achieved if your phone supports JSR 234 and has the