java-me

Synchronization in J2ME

If one doesn't use Threads or Timers, they wouldn't need synch, as all input/output is handled by a single thread. However, if one introduces TimerTasks, synchronization would be mandatory. There are two ways to synch the code in J2ME: The usual: using locks Using Display.callSerially(Runnable r) so that all external events would be s...

MIDlet as singleton

Is it safe to implement a MIDlet class as a singleton? That is, after all, the Display class is acting like a singleton for each and every midlet so is the midlet itself a singleton by behaviour so that implementing it as such wouldn't break something? In other words, it is not possible to have two instances of an app running, is it? I ...

Implementing sip in j2me for audio transmission

I want to transmit audio messages using j2me sip api. I used j2me MMAPI to record voice from the audio device but unable to send the recorded voice. when i try to send the audio message, i get an IOException with the following message *IOException : reader reading invalid frist byte 10000000* ...

difference between hash code and reference or address of an object?

difference between hash code and reference or address of an object? ...

Why does my J2ME Bluetooth code hangs after an incoming RFCOMM connection?

All I want to do is send "hello" to the first incoming RFCOMM Bluetooth connection and then exit. My code works on Nokia N73 but not on more modern devices like Nokia E52. In Nokia E52, the application hangs just after: streamConnectionNotifier.acceptAndOpen(); Here is the code: All the code is inside the run() method of my Thread: ...

How to hide the only the title bar and not the soft keys in j2ME

How can I hide the title bar (and also the midlet icon) and not the softkeys in j2me midlets? I am creating a midlet which make use of a canvas.the full screen mode hides both titles and soft keys. any ideas? ...

developing for blackberry 5/6

I am writing an java based application for blackberry. Can anyone please tell me if it makes any difference in running my app in old models of Blackberry or the latest version? Thanks. ...

how to debug java app in blackberry

I am developing a bluetooth application for blackberry. I am getting some BluetoothStateException's whil running the app on the phone. I am wondering if there is any way to debug th application on the phone? Thanks. UDPATE: There is an option in JDE I found to debug on device, but it keeps asking me to install signing keys.But I have n...

Generic Java mobile development

I'm working in a Java-oriented shop and we're starting to adapt our products to mobile devices now (mainly focusing on smart phones). A separate native app is already in the works for the iPhone, but we would like to make a generic Java/J2ME version for any other devices. My question is, how feasible is this? And where is the divergence...

how can i assign the hash code of any object into the instance veriable of the same object ?

how can i assign the hash code of any object into the instance veriable of the same object at compile time ? ...

is it possible to run a timer or thread in the constructor ?

is it possible to run a timer or thread in the constructor ? ...

Problems with the Sensor API in J2ME

Hi. I have a problem with the JSR-256. It's working fine for most of the time but sometimes it just gets stuck. I have a SensorConnection, called sensor, and from time to time (i.e. from a TimerTask) I ask the sensor for some data like so: Data[] data = sensor.getData(1); However, as I said, sooner or later, the app calls the method a...

blackberry java app throwing error while initiating bluetooth

I am trying to initiate a bluetooth device search in my java app. The agent.startInquiry seems to start but an exception is thrown from the catch block, and then I get an alert from deviceDiscovered() saying device discovered1. Is there is an exception, why is that deviceDiscovered is getting called? Can anyone please let me know if I a...

How can I connect to Facebook/Twitter/etc. in a J2ME application?

(Note: I have already seen this question, but it only refers to REST, and not the new OAuth system.) I would like to write a J2ME application (I have some basic experience of this) that connects to Facebook and retrieves some data, but I can't find an API. I understand that Facebook doesn't support WSDL (which, incidentally, I have neve...

Can we use j2me packages in android and vice-versa?

Can we use j2me packages in android development? I just mean to say like for eg: sax parser is supported in both the platforms. So can we code the business logic in j2me platform and use that class in android platforms and vice-versa? Just like this other components which are common in both platforms? ...

setIcon in j2me to set icons for buttons

Hi, I am trying to put in an icon (a scaled image) as part of a button that also contains some text. I am programming in J2ME for the Nokia SDK (S60 device) and using Eclipse. The code is as follows: but = new Button("Some text"); Image img = null; try { img = Image.createImage("/flower.png"); } catch(IOException e) { e1.printStackTr...

Convert char to lower case in J2ME without using the Character class

I'd like to convert a char to lower case in a J2ME app. The usual Character.toLowerCase() doesn't work for an arbitrary Unicode character in J2ME, so I need some light API, or, preferably, a piece of code that would do so. Thanks! ...

Problem on obfuscating j2me applications in Netbeans 6.8

When I'm trying to package a midlet with obfuscation, the following is displayed on the output window: pre-init: pre-load-properties: exists.config.active: exists.netbeans.user: exists.user.properties.file: load-properties: exists.platform.active: exists.platform.configuration: exists.platform.profile: basic-init: cldc-pre-init: cldc-in...

where class take the memory?

where class take the memory in java.plz reply asap........ Thanks in advance ...

add icon to j2me application

Hi how can i add icon for my j2me application midlet ??? i use eclipse thanks ...