java-me

How Do I Minimize a J2ME App?

蹲街弑〆低调 提交于 2019-11-30 19:51:25
I need my J2ME app to run in the background and still allow the user to use his mobile without problem. the app still needs to process some events in the background. I would also like to allow the user to stop the app if he wants to. How can I accomplish this? Running a midlet in the background but still processing is not specified in the j2me standard i think. Normaly at the moment your midlet is moved to background the paused method should be called. But not every vendor implements it that way. Symbian keeps your program running as if there was no change when minimized. At least on the N80

Blackberry - get checked items from list with checkboxes

◇◆丶佛笑我妖孽 提交于 2019-11-30 19:19:58
问题 How can all checked items from a list can be fetched? I need to get all selected (checked) items from the list and populate a vector. I am not getting all selected items, I am getting only the item on which current focus is. I am implementing listfield with checkboxes as per the knowledgebase article. If I use getSelection(), it is returning me the currently highlighted list row index, and not all that have been checked. 回答1: As I undestood, sample is How To - Create a ListField with check

Android bluetooth SDP does not recognize service advertised in JAVAME

纵然是瞬间 提交于 2019-11-30 17:46:04
问题 I am developing a Bluetooth application for my MSc. End Project. It includes a server implemented in JAVA ME , and a client written in Android . The problem is that Android SDP seems to fail at recognizing the ServiceRecord of my JAVA ME server. If I use the methods BluetoothDevice.getUuids() and BluetoothDevice.fetchUuidsWithSdp() in my client, they return a set of UUIDs , but my service's UUID is nowhere among them, thus I cannot connect to it. This is the code for JAVAME server example: /

J2ME With Sqlite

↘锁芯ラ 提交于 2019-11-30 16:34:55
Is there any persistent storage for mobile application of J2me, like SQLite? If there is then please share the link or some example code of interacting a simple J2ME application with back end persistent database. Yes, there is persistent storage for J2ME - called RMS (part of MIDP 2.0) - look here for short tutorial. RMS doesn't related to SQL, it's just for persistency. if you're looking for SQL alike storage - read this discussion . Hope it would be helpfull. chiranjib Perst Lite is McObject’s version of the Perst open source, object-oriented embedded database for mobile and embedded

Dictionary of English Words for a J2ME app

╄→гoц情女王★ 提交于 2019-11-30 16:23:44
I intend to develop a J2ME application, that should be able to read words from the English Dictionary. How do I interface to/and store a Dictionary ? Will I have to create the Dictionary myself, by inserting words, or is there a third party Dictionary available with APIs? There are definitely free dictionary files, so you don't need to make one yourself! A good starting point is looking at a Java SE implementation of a spell checker, such as Jazzy on Sourceforge . It has dictionary files included in the project, and by inspecting the code you can get an idea of how to integrate it into your

BlackBerry - image 3D transform

泄露秘密 提交于 2019-11-30 14:29:22
问题 I know how to rotate image on any angle with drawTexturePath: int displayWidth = Display.getWidth(); int displayHeight = Display.getHeight(); int[] x = new int[] { 0, displayWidth, displayWidth, 0 }; int[] x = new int[] { 0, 0, displayHeight, displayHeight }; int angle = Fixed32.toFP( 45 ); int dux = Fixed32.cosd(angle ); int dvx = -Fixed32.sind( angle ); int duy = Fixed32.sind( angle ); int dvy = Fixed32.cosd( angle ); graphics.drawTexturedPath( x, y, null, null, 0, 0, dvx, dux, dvy, duy,

algorithm for getting time zone from geo coordinates

試著忘記壹切 提交于 2019-11-30 12:03:49
I want to write app where user can point any place on map (not only cities) and get timezone in that place. What data structure (app will not have Internet connectivity) and algorithm should I use? Where I can obtain needed data (I wont more accuracy then divining map into 24 rectangles)? I will write my app in Java ME. Given that time zones are based on political entities rather than simply a physical lat/lon computation, I would create a data structure that mapped polygons over lat/lon coordinates into political entities (country and province/state) and then have a separate structure that

Java (Eclipse) - Conditional compilation

家住魔仙堡 提交于 2019-11-30 10:29:08
I have a java project that is referenced in j2me project and in android project. In this project i would like to use conditional compilation. Something like... //#if android ... //#endif //if j2me ... //#endif I have been reading about this but i did not find anything useful yet. sinek You could use Antenna (there is a plugin for Eclipse, and you can use it with the Ant build system). I'm using it in my projects in a way you've described and it works perfectly :) EDIT: here is the example related to @WhiteFang34 solution that is a way to go: In your core project: //base class Base.java public

Porting C library to Java for Blackberry application

北城以北 提交于 2019-11-30 09:04:50
问题 I need to port a C library to Java so it can run on the Blackberry platform (mobile, native application). The options I am considering are: bytecode conversion (cibyl, etc) Complete port Wrap C code around Java using JNA (would this even work for Blackberry?) Please let me know which option is best. thanks 回答1: Aha. Some quick googling says "No, JNI does not work for blackberry" source: http://supportforums.blackberry.com/t5/Java-Development/Can-we-use-JNI-Java-Native-Interface-approach-in

How to consume ASP.NET Web API from a Java ME Application

一个人想着一个人 提交于 2019-11-30 08:53:08
问题 I have created a java ME application (prototype) and now I need to consume my WEB API service from a MIDlet. First of all, is it possible to consume Web API services from MIDlets?? I have converted my WCF to Web API just so that I can make my J2ME app have access to my services in a more straightforward way. The problem is that I have no idea how to call my web API methods from a MIDlet. Have you ever done anything similar? Do you have any links that you can share?? EDIT: I have found how to