August 09, 2005

MidpSSH

MidpSSH is a J2ME SSH client. I've downloaded it and install it in my K750i and it works really good. Now I have access to my web server wherever I am :) Not sure if I can do anything useful though, doing anything with the mobile phone keypad is atrocious at best.

One setting that may need to be changed if you ever download this to your mobile phone is to make sure that your Java application connectivity is set to the "Internet" mode not "WAP" mode. For example with my Vodafone settings I have three entries: "VF Live! AU", "VF Internet", and "Vodafone PXT".

For normal WAP browsing I need to set my Internet setting to hse the "VF Life! AU" profile, this is needed for WAP stuff, don't really know why. I thought WAP is a simplified version of HTML and still runs under HTTP, but I must be mistaken.

Now for the MidpSSH I had to set the Java connectivity setting to "VF Internet". That's all. Oh and if you're wondering where do I get all these settings from? Just call Vodafone and they'll SMS you all the settings, you only need to select "Install" when the SMS arrived and it will automatically created for you. Isn't that cool?

Posted by vhadiant at 10:02 PM | Comments (0) | TrackBack

August 01, 2005

Magic Eight J2ME style

I thought creating a simple app will be good for me for learning J2ME, so I created a basic Magic Eight Ball. I always wish that I have a Magic Eight Ball with me in a critical moment, such as should I ask her out question, or should we go to a movie question, or simply should I ask her to marry me question ... you know usual stuff.

Now don't despair you can have a Magic Eight Ball (well not quite a ball really) right there on your pocket/handbag/nearby/or wherever your mobile phone is, when you need it and when you want it (no one would hire me in marketing).

Download it here, unzip, upload to your mobile phone and install. I would have put the jad file on the web to test download J2ME app but I don't have a control on my website so I can't change the content-type of the jad file as a J2ME app, it sucks really.

Posted by vhadiant at 11:45 PM | Comments (0) | TrackBack

July 27, 2005

Creating and deploying HelloWorld MIDlet to Sony Ericsson mobile phone

So I got a new toy, Sony Ericsson K750i. What a beauty, check the review here and here.

Anyway this post is not about the K750i, but about how to create and deploy your first MIDlet app to Sony Ericsson mobile. Being new to any mobile development trying to figure this one out is pretty frustrating. It seems like there isn't any good tutorial about how to simply do this. I over 2 hours trying to figure out everything from scratch. Mind you I haven't touched Java for almost 2 years now :)



* First download JDK 1.4: http://java.sun.com/j2se/1.4.2/download.html

* Download Sony Ericsson J2ME 2.2.1 SDK: http://developer.sonyericsson.com/site/global/docstools/java/p_java.jsp

* Now follow this tutorial: http://developers.sun.com/techtopics/mobility/midp/articles/wtoolkit/
Only in that tutorial open the KToolbar from Sony Ericsson menu. Most likely you'll use the WTK 2. Sony Ericsson J2ME SDK has been modified to suit their phone. Not entirely sure what the modification is, but anyway I decided to use their SDK rather than Sun's SDK.

* It's working on the emulator? Good. Now there's only one more problem. How to deploy the app to your mobile phone? I couldn't believe it but this took my ages to find out. There's a couple option, you can upload the jad and jar file to a web server and download it to your mobile phone. I was about to do this until I realise that you need to set your webserver to recognise the jad and jar file correctly. So this isn't really an option for me (web hosting problem). See instruction here: http://www.devx.com/Java/Article/10688/0/page/2

I kept looking and I found that Motorola has a special app to let you upload your jar and jad file to your mobile phone. I spent a few minutes looking for similar app for Sony Ericsson and couldn't find any. There's a KB article at developers.sonyericsson.com but that didn't help. That's about uploading your jad/jar file using Bluetooth/IRDA/COM which kinda sucks. How many people actually will use those to upload their jar/jad? That's dumb really and terribly misleading.

I did a search on their forum and found this message: http://developer.sonyericsson.com/show_thread.do?forumId=10&threadid=19570

And more here

Doh' it turned out to be THAT easy to deploy it. Simply upload the jar AND jad file to the "Other" directory on your mobile phone (use the Sony Ericsson's file manager to do this), use your mobile phone to browse to the jad file and select "Install". That's it!

* Oh and by default KToolbar won't create the jar file for you. So to do this check in the directory where you created your first HelloSuite project (mine is at: D:\SonyEricsson\J2ME_SDK\PC_Emulation\WTK2\apps\HelloSuite) you'll find that the JAD file is there, but not the JAR file. Now you have to create the JAR file that contains the MANIFEST.MF file created by KToolbar. This is important as per Dim's post in the forum that it won't work without it. Use this command:

d:\j2sdk1.4.2_08\bin\jar.exe cmf MANIFEST.MF HelloSuite.jar -C ..\classes .

And off you go....




Oh and it turned out that the person who posted the question is Dim Colebatch, an ex-colleague of mine from NUIX days. Well at least I'm pretty sure it's the same person .. same name, same field (Java, Linux) and same way to sign his stuff:

cheers
dim

Yeah I'm pretty sure it's him :)


Posted by vhadiant at 10:27 PM | Comments (0) | TrackBack