cldc

Trigonometry in CLDC 1.0 / MIDP 2.0 application

我是研究僧i 提交于 2019-12-24 02:07:32
问题 How can I use trigonometry in CLDC 1.0 / MIDP 2.0 application? I need "sin cos tan asin acos atan atan2" functions from standart Math library. Thanks 回答1: gnat knows 回答2: update to prior answer gnat knows Above link to Sun Forums became dead after migration to Oracle. If memory serves, back then I suggested to consider MicroFloat library. There is also a chance that mentioned Sun forums thread was migrated to this one: Sin & Cos with CLDC. Since message formatting was broken in migration and

Image Map-like Blackberry Control - CLDC Application

巧了我就是萌 提交于 2019-12-23 23:05:38
问题 Does anyone know of an Image Map-like Blackberry Control that I can use in my CLDC application? If there isn't one, is there a way to get click x,y coordinates on a MainScreen or BitmapField derived control? Thanks, 回答1: I assume you're thinking of this control for the Storm - the only device for which clicking on an arbitrary point on screen makes sense. In that case, the easiest way is probably to subclass BitmapField to be focusable and respond to clicks - something like this: public class

Commands sometimes don't work

余生长醉 提交于 2019-12-11 07:21:28
问题 There is a Canvas which has two Command s. The problem is that when the canvas is first opened then the commands work , but when I open it for the second time then the command doesn't work! Here is the code: package view; import java.io.IOException; import java.io.InputStream; import javax.microedition.io.Connector; import javax.microedition.io.file.FileConnection; import javax.microedition.lcdui.Canvas; import javax.microedition.lcdui.Command; import javax.microedition.lcdui.CommandListener;

Using boolean var for stopping threads

 ̄綄美尐妖づ 提交于 2019-12-07 17:29:52
问题 I have a Java book I'm learning from and in one of the examples, I saw something suspicious. public class ThreadExample extends MIDlet { boolean threadsRunning = true; // Flag stopping the threads ThreadTest thr1; ThreadTest thr2; private class ThreadTest extends Thread { int loops; public ThreadTest(int waitingTime) { loops = waitTime; } public void run() { for (int i = 1; i <= loops; i++) { if (threadsRunning != true) { // here threadsRunning is tested return; } try { Thread.sleep(1000); }

MIDP 2.0 version issues: $method is undefined for $type

两盒软妹~` 提交于 2019-12-07 10:40:58
问题 I've written a MIDlet that does several "advanced" things: fetching images from the web, resizing them, saving them on the phone, displaying them. This all works perfectly in the Nokia S60 3rd Edition FP1 emulator. This device has MIDP 2.0 and CLDC 1.1 support (also JSR75, which I need in order to save files). It also works as it should on the Nokia E71 (physical device). I then tried to run the MIDlet on several other emulators. One of them, the DefaultCldcJtwiPhone2 from the Java ME SDK 3.0

Using boolean var for stopping threads

淺唱寂寞╮ 提交于 2019-12-05 21:52:41
I have a Java book I'm learning from and in one of the examples, I saw something suspicious. public class ThreadExample extends MIDlet { boolean threadsRunning = true; // Flag stopping the threads ThreadTest thr1; ThreadTest thr2; private class ThreadTest extends Thread { int loops; public ThreadTest(int waitingTime) { loops = waitTime; } public void run() { for (int i = 1; i <= loops; i++) { if (threadsRunning != true) { // here threadsRunning is tested return; } try { Thread.sleep(1000); } catch(InterruptedException e) { System.out.println(e); } } } } public ThreadExample() { thr1 = new

MIDP 2.0 version issues: $method is undefined for $type

为君一笑 提交于 2019-12-05 17:39:19
I've written a MIDlet that does several "advanced" things: fetching images from the web, resizing them, saving them on the phone, displaying them. This all works perfectly in the Nokia S60 3rd Edition FP1 emulator. This device has MIDP 2.0 and CLDC 1.1 support (also JSR75, which I need in order to save files). It also works as it should on the Nokia E71 (physical device). I then tried to run the MIDlet on several other emulators. One of them, the DefaultCldcJtwiPhone2 from the Java ME SDK 3.0, also claims MIDP 2.0 and CLDC 1.1 support. It doesn't have JSR75, which explains why "FileConnection

Getting Device IMEI

送分小仙女□ 提交于 2019-11-27 23:57:35
How to get the IMEI of a Java ME device in a common way that is applicable to all devices Usually, using java.lang.System.getProperty() can return the device IMEI. Unfortunately, the String parameter you need to use to get the IMEI will change from one handset manufacturer to the next. Strings to try: imei phone.imei com.lge.imei com.nokia.imei com.nokia.mid.imei com.siemens.imei com.sonyericsson.imei com.motorola.imei ... you get the idea. you may need to uppercase the last part of the string. the format of the result can change too. it can be a full imei with a "IMEI" prefix and 3 "-" in the

JSON parser for J2ME

十年热恋 提交于 2019-11-27 08:57:19
I need a basic JSON parser that works with J2ME / CLDC 1.1. A Google search returns tons of answers on this (some even on stackoverflow), but it appears that all point to libraries and solutions that are no longer available (for example, lots point to an implementation that is supposed to be on the json.org site, but at least I can't find anything that isn't J2SE only there). My best hope so far is the source linked here: https://meapplicationdevelopers.dev.java.net/mobileajax.html , but from that one I can't even find a straight forward way to download the code. Given the mature state of Java

Is there any option for local database like Sqlite for j2me - CLDC devices?

老子叫甜甜 提交于 2019-11-27 04:01:05
Is there any option for local database like Sqlite for j2me - CLDC devices? PerstLite and OpenBaseMovil are both under dual license. Is there any open source option for this? Or, any alternate way of developing application. from List of Database in J2ME : Apache Derby - an open source relational database / about 2 megabytes Java DB - Sun's supported distribution of Apache Derby database / footprint of 2.5 MB Floggy - free object persistence framework for J2ME/MIDP applications / 11k API J2MEMicroDB - free object persistence framework for J2ME mDrawer - J2ME generic database program with DES