java-me

Java Micro Edition (J2ME) - Delete element from Record Store

Hi there, I have a record store which holds a list of shopping items i am currently serialising the data like so ** (inside) ItemClass ** ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream(); DataOutputStream dataOutputStream = new DataOutputStream(byteOutputStream); dataOutputStream.writeUTF(getOwner()); d...

Java Micro Edition (J2ME) - Update Record using recordstore enumeration

Hi there, I have a record store of items which have (name, quantity, owner, status) Now when the user triggers an event i want to set the status of all items in my recordstore with "purchased" re = shoppingListStore.enumerateRecords(null, null, false); while (re.hasNextElement()) { // read current...

Verify a X.509 certificate with Java ME and Bouncy Castle

Hi, Can anybody point me to an example of verifying a X.509 certificate with Bouncy Castle under Java ME? I can see how to easily do this in Java SE code with java.security.cert.Certificate.verify(), but I could not find an equivalent method in the lightweight BC API. Thanks in advance! Cheers Dino ...

Image creation performance / image caching

Hello, I'm writing an application (J2ME MIDlet) that has a scrollable image (used to display a map). The map background consists of several tiles (premade from a big JPG file), that I draw on a Graphics object. I also use a cache (Hashtable), to prevent from having to create every image when I need it. I don't keep everything in memory...

Finding objects in J2ME M3G

I'm using Blender to create m3g files and then I load them in a java program. Which is the best way to find an object (a Mesh) in the World? (How should I "build" a world?) Should I create separate classes for every object and then add them to one World object or should I assign IDs to the objects in Blender and find them in the program...

image not displaying in midlet

Hello all,am new here. i have a slight problem; PLease look at the following code and tell me if am doing something wrong because the image is not displaying. i have made it really small so it should fit but its not displaying. i have images displaying in other screens but this main midlet would not. Here is the code: import java.io.IO...

HTTPS connection fails with IOException: "APN not specified" (Blackberry)

My Java ME Midlet works fine on Java phones and the BlackBerry simulator, but I can't receive a connection on a BlackBerry. I see a message that asks for permissions to connect, but when I select yes, it doesn't connect and instead throws an IO exception with the message APN not specified. Does anyone know why this might be failing? ...

Test Automation Framework For Embedded Platforms

How can i develop a Test Automation Framework for Embedded Devices to achieve the challenge of no dedicated and successful framework for Embedded application in current IT industry. and what are the ways to develop this framework? ...

How to combine elements from different List

Hello, i am trying to figure out a way around this. i have two Implicit List in which clicking on any element in the first list will always send the user to the next list. my problem now is how does the second list remember the element that invoked it in the first list so that it can act accordingly. heres is an example: first List Comm...

Substitute for exception causes in Java ME

In Java SE it is possible set the cause of an exception using initCause to avoid losing information about the error when catching and rethrowing an exception. Is it possible to do the same in Java ME? ...

Java ME SDK emulator options

Hello, For one of the older versions of Java ME SDK emulators I found this tutorial http://java.sun.com/products/sjwtoolkit/wtk2.5.2/docs/UserGuide-html/projects.html I am looking for similar options for the verson 3.0, but the device manager wont open or show me any option windows. Can anyone tell me where I can find the options to s...

eclipse mtj memory monitor

Please tell me how can i activate the Sun JavaME memory monitor within eclipse mtj. Thank you. ...

j2me - compare 2 dates

I am developing a J2ME application (CLDC 1.1 and MIDP 2.0) and I was wondering, What is the best way to get the time span between 2 dates? thanks, Tal. Edit: Here is a little sample using the answer below: public class TimeHelper { public static long getTimeSpanInMilliSeconds(Date d1,Date d2) { return Math.abs(d1.getTime() - d2....

How to make a thumb from a big image file in J2ME?

I'm trying to display a big image file in a J2ME application. But I found that when the image file is too big I can not even create the Image instance and get a OutOfMemory exception. I suppose I can read the image file in small chunks and create a thumbnail to show to the user? Is there a way to do this? Or is there any other method to...

sample backberry java applications

Hi, i'm very new to blackberry java development. i want to develop a shoutcast client for blackberry device. a simple application should have a background image, play/pause button and a volume bar... ...

How to bypass the user confirmation in J2ME?

i have a j2me application , it does the File IO operation, but every time it performs it , it asks user for permission. is there any way to bypass it? i heard that suppose if i make this application certified then i would be able to run it in max. secure mode to bypass such issues. ...

How to read and write data simultaneously in a chat application with J2ME??

I am trying to build a bluetooth chat application using j2me. I created a thread which is used for connecting to other devices. Two devices can be connected now. I opened the input and output stream. I want to read and write data simultaneously from input and output stream. I dont have any idea how to achieve this?? Should i create a new...

Retrieve group from symbian using J2ME

I got the Contact List of symbian but not getting the group. for getting the contactlist i have coded PIM pim; pim=PIM.getInstance(); ContactList clist=null; clist=(ContactList)pim.openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE); Contact c=null; Enumeration contacts=clist.items(); while(contacts.hasMoreElements()){ c...

Encrypting files on SD card and sharing it with other apps

I would like to store a file on SD card, lets say an mp3 file and encrypt it. And would like other apps to be able to play them but BB automatically decrypt them?(Does DRMManager do this?) Basically, I would like to keep the mp3 files locked to the BB device. If they tried to open the mp3 on say a desktop or another BB, they won't be a...

How to get the Group Id of symbian using J2ME

I got the group names by using ContactList clist=(ContactList)pim.openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE); String[] s=clist.getCategories(); and now i want the groupid like i am getting the contact id using Contact.uid ...