Cebu Business I.T. Incubator

J2ME Programming: Reading and Writing to a RecordStore (RMS)

If you are working on a mobile application project with J2ME (Java Micro Edition) and needs some sort of a data storage, you can work it with Record Management System (RMS). RMS is an API for MIDP applications which allows data persistence, facilitating data storage for your Java-based mobile phone applications. You just need to access it via javax.microedition.rms.* class. It’s like the relational database but a simpler one. If you want to learn more in-depth with RMS, please visit Databases and MIDP.

Two common methods or functions for RMS is the reading and writing to a recordstore (javax.microedition.rms.RecordStore). A RecordStore serves as the database. Read more…



Java Mobile Programming: J2ME Using RecordStore (RMS)

j2me-smarty-phonebookHere’s a quick code demo on how to use J2ME’s RecordStore feature under the record management store (RMS). With RMS, you can add, delete, and update/edit data via the MIDlet interface. This sample code was created during my 3rd year CS elective class (CS Elect 1 – Mobile Application Development) in ADZU. It is a simple phone address book with the following functions:

  • Adding of new entries to your phonebook
  • Updating / Editing of entries in your phonebook
  • Deleting of entries from your phonebook
  • Sending querries to your phonebook (sorting and filtering)

Click here to download the source code.



Java Mobile Programming (J2ME): Menu, List and Alert

Here’s a short sample application implementing List, Menu, and Alert items using J2ME Mobile Application programming. I use Netbeans with Java Wireless Toolkit (comes with mobile phone emulators) in developing J2ME-based applications. And if you want to install this on your Java-enabled phones, you can do so by copying the JAR file to your phone and run it.

Below is the screenshot and the source code:

Click here to download/view source code for this demo.



Java Mobile Programming: J2ME Chat Application Using Datagram

Enjoyed one of my Computer Science elective class back in college, all about J2ME (Java Micro Edition) – a Java development platform for mobile devices. Got interested in reviewing the topic again since I learned that developing Android applications is similar to the once we discussed in school. So might as well refresh what I learned before going to Android Java development soon.

Here’s a simple project we had. It’s a chat application via UDP, sending chat messages via datagram connection and I named it  BlueChat. You can view the code here.

Read more…



J2ME: Java Mobile Application Programming

java-logoFascinated with those mobile applications you have in your mobile phone? The pre-installed utility tools and games, so called mobile application, are perhaps developed using Java’s Micro Edition – J2ME. J2ME is a subset of the Java platform, along side with J2SE and J2EE.

Since Java is platform independent, developing mobile applications with J2ME is portable as long as your device supports Java. So, check your phone specification if it supports Java (usually stating the version of your MIDP and CLDC). And if it does, you’re good to go or if you do not have it, we can use emulators.

Let us setup your IDE and try to develop a simple application. The IDE I use in developing Java Mobile applications is Netbeans (you can also use Eclipse, JCreator, etc). With Netbeans, you have a complete tools for J2ME mobile programming – editor, debugger and emulators. Just download and install Netbeans and be sure to have the Java Wireless Toolkit with it. This will provide you the capability to run and debug mobile application, assuring that the application you will soon deploy is compliant to your target devices.

So, if your Netbeans is ready to go, check out for some examples to work on at this site – Sun Mobile Device Technology – Code Samples and Apps. Please take note that it is good that you have Java programming experience to be able to understand the code or at least a programming experience.

Read more…