I need javax.microedition.io in android, what can I do ?

by Mark Murphy » Sat, 27 Mar 2010 04:57:31 GMT

Sponsored Links

JavaME is not part of Android.

So you can:

Step #1: Find an open source implementation of what you need.

Step #2: Copy it into your project and rename it to some other package
(e.g., com.rakhimov.io).

Step #3: Repeat steps 1 & 2 until you get all the dependencies resolved.

Step #4: Write a test suite to make sure it works the way you expect.


Step #1: Rewrite the code that requires javax.microedition.io to use
standard JavaSE-style I/O.


Step #2: There are supposed to be some JavaME compatibility layers
available for Android, but I do not know their names or sites off the
top of my head.

Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Android App Developer Books:  http://commonsware.com/books 


Other Threads

1. Vibrate constructor is not public and not documented in API Differences

How do I get an instance of Vibrate in a different package now that
the constructor is not public?

2. Find existing contact by phone number

We're building an application where we need to check if there is
already an existing contact in the native Android phone book by
searching by phone number and e-mail.

I have a contact with the phone number: 123-456-7890 in my Contacts.

In my application I'm doing the following, but nothing ever matches.
Can somebody help me out?

    public Boolean matchingContacts() {
        Boolean matchesFound = false;
        String[] projection = new String[]
{ android.provider.Contacts.Phones.NUMBER, };

        Cursor managedCursor =
managedQuery(android.provider.Contacts.People.CONTENT_URI, projection,
                android.provider.Contacts.Phones.NUMBER + "=\'" +
"123-456-7890" + "\'", null, null);

        if (managedCursor.isFirst()) {
            Log.d("MatchingContacts", "Found a match!");
        return matchesFound;


3. glass pane like widget

4. qemu emulator flag not supported anymore in the 1.0 SDK?

5. Detect Emulator/Get phone info

6. Eclipse plugin link is a 404

7. first app ( NOT HELLO WORLD)