How to make JavaME .jar files downloadable from Apache Web Server

Mobile application developers may have realize that one of the best (and recommended) way to distribute their JavaME/J2ME application is by hosting it on a website. This makes it easier for potential users to navigate and download the .jad or .jar files from their phone browsers and to execute it directly.

However, some web servers are not configured to handle .jar / .jad file requests, eventually leading to failed install response received by the mobile users.

To remedy this, .jad / .jar files need to be associated with the correct MIME type. In Apache, you can do this by creating ‘.htaccess’ file in your web directory, and inserting these lines :

# JavaME
AddType text/vnd.sun.j2me.app-descriptor .jad
AddType application/java-archive .jar

Afterwards, safe the file. The web server should behave accordingly when requests are made to either of these files. For other web servers, please refer to their respective manual or online-help on how to change document MIME type.

DateDiff – A simple JavaME mobile app to calculate the day differences between two dates

There are times where I am required to calculate the day/month/year differences between two dates, which I found a little bit troublesome to do repeatedly even if it is just a simple estimate. So in turn, I created this mobile app to do the job, which greatly increase my productivity! Here i’m releasing the source code to DateDiff, which is coded and compatible with all JavaME phone:

DateDiff mypapit

DateDiff.jar – binary (MIDP 2.0)
datediff_src.zip (source code)

DateDiff is copyrighted by me, and is licensed under a BSD-like license, you can read the terms of use from the ‘About’ menu or from the source code.

BluePad: Controls Presentation from Your Phone

Recently I had todo a lot of presentations which made me thinking into getting presentation pen, but since my E71 includes a pre-installed Wireless Presenter (WiPresenter), I’ve buried that thought, who needs an expensive presentation pen when a phone can perform equally when?

Bluepad remote control

But as WiPresenter is only compatible with Microsoft Windows operating system, I’m forced to use keyboard or mouse-clicks to control my presentations when I’m using Ubuntu Linux operating system. This is a drawback as I could perform the task easily thru my phone when I’m on Windows XP.

EnterBluepad, an application which enables your mobile phone to act as a Bluetooth controller. Bluepad consists of two applications, a server and a client. The server application sits on your operating system, monitoring for incoming Bluetooth connection. The client application requires a JavaME compatible mobile phone with JSR-82 (Bluetooth) feature.

The installation is straightforward for both client and server side application, the only thing to remember is to activate bluetooth on mobile phone before starting the client application. After that, you can start OpenOffice Impress and use the the phone to remotely control the presentation.

HP Officejet 5680 – How to Send Fax from Ubuntu Linux Computer

This serves as a continuity from my previous post, I got myself a new and flexible Printer – HP Officejet 5680 All in One.

HP Officejet All-in-One Under Ubuntu
Its all seems rather easy at the way I left off, the printer is fully functioning by just plugging it to my Ubuntu pc, the scanner works well without I having to do anything special, the phone is fully functioning (yeah it is included with the printer) and I am able to send and receive fax without a hitch, something that I cant do without installing 350MB of companion application (half of it was crapware) under WIndows Vista.

Everything worked, what left to do?
What left to do is figuring out how can I send fax directly from Ubuntu (or other Linux base operating system) using only digital files (*.txt, *.pdf, *.ps, *.jpeg), so I don’t have to print those files and fax them one by one anymore.

HP Linux Imaging and Printing project
Through googling, I found that Hewlett Packard (HP) has published open source software tool to deal with their printers. Free and Open Source drivers and printer-specific application directly from manufacturer, which is very cool!

Fortunately Ubuntu already installed HPLIP tools by default with CUPS in my machine. The next step that I should take is to run ‘hp-setup’ as root to configure my printer port and run the ‘hp-sendfax’ application to send the faxes.

Both of these tool requires python-qt3 package which is available from Ubuntu software repository.

Now I can fax my pdf documents directly without having to print them first, a huge saving over ink and paper cost.

hpfax11.png

hp2.png

Conclusion
If you are planning to get a new printer, then I would suggest you get a HP printer. Not only because HP printers are reliable, but they also comes with Free and Open Source drivers and applications for the Linux based operating system. Well that’s a good reason to get HP printers.

Please visit HPLIP project website for more information about HP printers support under Linux based operating system.

[tags]hp,hewlett packard,printer,linux,opensource,ubuntu,foss,drivers,hardware,scanner,officejet[/tags]

LBRC – Control Linux PC with Bluetooth Device

I’ve got this link (LBRC) from TuxMobil. LBRC is a set of application which enables a Linux computer to be controlled from a mobile device using Bluetooth technology.

LBRC consists of two part, client and server. The server part uses dbus and python and the client part uses JavaME application on JSR-82 (Bluetooth) capable mobile devices.

My Thoughts about it ?
bluetooth-logo.jpg
I’ve a bluetooth receiver I bought for RM15 from lelong.com.my, I’ve a bluetooth capable phone, I can cook out a mobile phone application that can utilize bluetooth transceiver either in JavaME or Python.

A tempting thought, may be i’ll try out this stunt once I’ve *much* more time

[tags]phone,linux,j2me,bluetooth,j2me,dbus,javame,pys60,python[/tags]

Adapting StringTokenizer for J2ME

Besides being a GNU/Linux user (Ubuntu user specificly), my favorite past time (was) include coding mobile application in Java (JavaME), and here’s a post that I write about my modified StringTokenizer class that can be use in J2ME / JavaME application : Using StringTokenizer in J2ME application

p/s: I adapt the StringTokenizer class couple years? for one of my project, although I hardly have the time to code in java anymore.
[tags]linux,j2me,javame,mobile[/tags]

j2meshitheap.com – a list of the world’s worst J2ME-enabled phones

JavaME (formerly J2ME) software fans? Then please avoid any of these J2ME-enabled phones because one or more of their implementations are either broken, incorrect or plainly doesn’t work.

I personally tested 3650/3660 J2ME implementation first hand by running some of my midlets. In my oppinion i think Nokia 3650/3660 has the worst j2me implementation that I’ve encountered because some of the *Listener object failed to respond correctly, plus the networking part of the midlet almost always failed.

I would also want to add Nokia 6600 to the list because of various bugs in its implementation, though not as annoying as 3650/3660, it is still noticeable.

so please visit http://www.j2meshitheap.com for more complete listing

Moon Phase on your hand phone

A’kum…
Hari ini aku nak discuss pasal application yang aku buat untuk hand phone dgn Palm, application nie boleh display Fasa Bulan dengan tarikh Hijrah. Aku berjaya portkan program Traymoon aku dari system tray Windows application kepada handphone dengan Palm.

Fasa Bulan in Phone Emulator

So sekarang nie korang semua boleh semak fasa bulan dengan tarikh hijrah straight dari henset ataupun PDA korang. :)

Actually aku dah berjaya buat ni sejak 2-3 bulan lepas, tapi memandangkan masa tu aku takder port untuk buat presentation + promosi, so benda ni aku KIV-kan dulu sampai la hari nie.

Handphone application nie actually boleh run dalam mana-mana handphone yang mempunyai Java support. Application nie boleh gak run kat PalmOS (version 3.x keatas) asalkan user palm tu install extension Midp2Palm. Antara hand phone yang di uji dengan menggunakan application nie adalah Nokia 3100, 6230, 6260, 3650, Siemen S55, M46.

Fasa Bulan in Nokia 6230 Emulator

Terdapat bug dlm Symbian OS Nokia Series 6.x (3650) yang menyebabkan application nie kekadang hang. Bagi user yang menggunakan Nokia Symbian OS tersebut, anda digalakkan mendownload applikasi (reduced version) yang tidak memasukkan beberapa ciri-ciri user-friendly (ItemStateListener). Ini merupakan bug implementasi Symbian OS Nokia Series 6.x bukan bug Fasa Bulan.


Fasa Bulan in PalmOS Emulator

Aplikasi Fasa Bulan untuk handphone ini masih lagi dalam peringkat awalan, dan ini merupakan versi pre-release untuk kegunaan umum buat sementara waktu. Segala komen and pendapat anda adalah sangat dihargai untuk memajukan/memantapkan aplikasi ini. Aplikasi ini akan direleasekan mengikut terma dan syarat GNU General Public License versi 2.0 sekiranya ia stabil dan siap sepenuhnya. Bahasa pengaturcaraan Java telah digunakan untuk membangunkan aplikasi ini beserta J2ME toolkit.

Install
Anda juga boleh meng-install aplikasi ini terus ke handphone anda menerusi kemudahan GPRS, anda hanya perlu pointkan browser anda kepada url ini http://duid.com.my/mypapit/FasaBulan.jad.

Download Fasa Bulan Midlet at :
1. Fasa Bulan Alpha | jar
2. Fasa Bulan for buggy phone, Symbian Series 60 | jar
3. Fasa Bulan for Palm OS

Additional Information :
1. Java 2 Micro Edition Website
2. MIDlet for Palm