Audio Book Player using J2ME

I love to listen to audio books but I don’t have iPod, which I think is the best audio book player out there. The only MP3 player that I have is my Creative MuVo Tx FM (512Mb) 😐 It doesn’t have bookmarks feature but there is one thing that I love from this old MP3 player: you just drag-and-drop MP3 files into it, just like copying files to a Flash USB disk 🙂iHearMusic

Since my Nokia’s J2ME supports MP3 and File access (JSR-75), why not making a J2ME audio player? It’s basically an MP3 player but with bookmark features. Using MMAPI (JSR-135), the player should be able to play mp3, m4a, aac, or any other audio formats, and the FileConnection (JSR-75) allows it to access memory cards and make a playlist based on the files inside the folders.

That sounds really possible to do 😎

But a two-days-research prove it wrong 👿 Know I now, why there isn’t any free mp3 or audio book player for J2ME…

Click jump to read the full article (it’s going to be very technical.. 😉 )

Continue reading

Six Things that Sun didn’t Tell You about J2ME and Gaming

Wanna create games for your mobile phone?
Wanna show your mobile to your friends while saying “I made this game”?
Wanna be rich by creating and selling content for mobile phone?

If you ignore the last question above, then maybe J2ME is a good choice for you 🙂

Most of the latest mobile phones support J2ME. Even if it’s your Opa’s or Oma’s mobile phone, as long as it’s not older than 5 years old, than there’s a big chance that it supports J2ME, maybe the first version.

Developing game for J2ME is not that hard. It could take 2 – 3 weeks for creating one working title. If you compare with other systems, the average game development time for Symbian is around 3 – 6 month, and so does PDA. And Java is easy to learn if you compare it to C++.

Yeeehaaaa, I’ll make games and get rich …

BUT, wait! If you’re rushing to Sun, Nokia, or Sony Ericsson webpage to download their J2ME SDK, then you might consider this. After dealing with J2ME for almost 3 years, I want to share with you something that Sun never told you or put on their web page.

 1. J2ME is slow
I think almost all J2ME game programmers would agree on this. J2ME is still Java family, which is quite known for its fat-and-slow problem. Okay, maybe we shouldn’t complain about this since it’s the natural of Java, but programming game on top of slow platform is a no-no, especially if you’re making a fast-pace game 😕

Java is slow

2. Resource access limitation
Accessing your phone’s camera? Writing save-files on your phone’s memory card? That sounds possible but be careful! The standard J2ME does NOT Continue reading

Video capturing in J2ME

Four months ago, I planned to use J2ME-enabled mobile phones for my master thesis. The idea is to make some kind of virtual laser pointer, where you can point your mobile phone to a big screen during a presentation in order to control the cursor/pointer. The mobile phone, using its camera, captures the picture of the big screen, process the data, and calculate the position of your pointer. The mobile will send the data to the computer (via Bluetooth) and then the system change the pointer position based on where you point your mobile phone. Yup, it’s just like moving the red-dot-thingy-on-the-screen when you’re using the laser pointer.

 Pointer for presentation

Another important aspect is that more than one user can use this system. So, imagine more than one user were controlling several pointers on the screen. What can we create on top of this? Game (of course, it’s my first thought 🙂 ), or a voting system (but my professor wants this), or other interactive multimedia application.

Game during cinema break? I don't think so...

I love programming using J2ME and I’ve been using it for more than 2 years. I think that there are more people using mobile phone rather than PDA and thinking the right market is an important aspect for me. PDA is more for business people, which means perfect for business related application but not for other stuff. Even for gaming (except for simple time-killer games like puzzle or card).

But, J2ME really did a great job in disappointing me. Let me tell you why.

No J2ME Phones can support video capturing

Theoritically, using MMAPI, you can record video, audio, taking snapshot, play MP3, and other stuffs which can take one page long if you list them. But after searching the Nokia fourm, Sony Ericsson, J2ME programmers, I found that most of the phones only support taking snapshot. If you try to record video by using the example source code from Sun’s WTK 2.2, then you’ll get error message.

The only hardware that support video recording is the very latest Sony Ericsson phone K610, and Nokia N-series. I couldn’t found about someone implementing it on these phones. Maybe the phones are too expensive for the programmers.

Not even the emulators…

Yup, not even the emulator can support REAL video recording. Yes, you can do video recording, but you can only record some randomly-generated-pixels. You CANNOT connect to your webcam, for example, to capture real life picture, neither for just taking photo. Actually, there is one emulator which allows you to capture video/image from your webcam (motorola iDen 850) but the resolution was very small (160×120).

How about just taking snapshots continously? 

I’ve tried that too. I made a single J2ME application for that purpose. When you press fire button on your joystick, it will capture several frames and show it to the screen. I tried it on Nokia N6600 and Sony Ericsson K750, one of the latest & widely used phones on the market. And guess the result…

It was too sloooooowwwwww

I got 2 frame per second. Yes, it’s TWO frame per second. And what I was doing is just capturing images continously. No image processing. No image transmission via Bluetooth. No complex calculation.

and many other limitations

You cannot change the image format freely. It really really depends on which formats that the hardware supports. For example, the Sony Ericsson K750 which I used, only allows you to take picture in JPEG format. You cannot cange the format to raw bitmap for increasing the speed.

You cannot draw something on top of your ‘viewfinder’ image. So, before you press the button to take photo, you can see this viewfinder. It shows you anything that gets through your camera lens. And you can make you J2ME application to show this viewfinder image which is automatically updated smoothly but however you can’t access it. It’s untouchable.

So.. 

I have to throw away my idea of using J2ME. In the end, I am just using my laptop connected to webcam. I use C# with Visual Studio 2005 Express Edition. Just enough for proof of concept.