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]