Monday, November 21, 2005

Sprint PCS toolkit and Netbeans 4.1 (How To)

This post deals with ONE way to get the Sprint PCS toolkit 2.0 to work with the Netbeans 4.1 (Mobility Pack) IDE.

1) In the IDE, Open the Java Platform Manager (Tools->Java Platform Manager).
2) In the Platforms: section, select J2ME.
3) Click on the Add Platform Button.
4) In the Dialog that opens up, navigate to the Sprint Toolkit installation directory and select the 'EmulatorWTK2.0" directory.
5) Click Next and Finish up the process.

Now that the Sprint Platform has been added to the IDE, you can test it out by importing a project from the Sprint PCS toolkit. I am using the MapMuglet MIDlet suite as this uses the com.sprintpcs.util package.

Note: While importing the application, Set the Emulator Platform as the Sprint PCS toolkit 2.0 from the drop down in the final step of the import.

Tuesday, October 25, 2005

Complete Shutdown

I dont know if this is the work of Rahu or Ketu but the last week or so has been a complete shut down in my life.

It started early last week with my Laptop stopping to work completely. Just got it fixed today. There was some issue with the fan on the motherboard. Even without my laptop, I was some what at ease with my desktop and then all of a sudden on Wednessday night both the comcast internet connected and cable TV connection had some issues and gonked out on me. I have been waiting for the service guy to show up and am quiet pissed now at the so called customer service comcast offers. The service guy isnt available till Saturday !!!... thats a whole week and half without any service and they expect me to pay for it ???

Anyways, since I have almost nothing to go back home to, I decided to spend some time in the office and voila... my hard disk crashed today. My admin says he will not be able to get something working on my machine till tommorrow and even then he isnt sure about the data. Damm... feeel completely pissed off right now.

The only bright shining light... got my laptop back from the repair shop. Its working fine :-).

Friday, October 14, 2005

J2ME Wonderland

Been out of the posting loop for quiet a while. Found myself working on J2ME after about 6-7 months of hardcore BREW development last week. The whole time I spent on working in Java for mobile phones made me appreciate BREW even more. Its not the development environment or anything of that sort. Developing in Java is great, its the implementation of the JVM (KVM) on the handsets that sucks. I know the whole security, write once run everywhere routine but I feel Java draws the short straw when it comes down to cell phones.

BREW isn't perfect but it does give a developer a whole bunch of control over the flow of the applet. J2ME is sadly, very implementation dependent. Things that work flawlessly on a Nokia device will crash on Sanyo. Developing a MIDlet that in truly cross platform is an art that you learn from experience.

I learnt something new about the Security Architecture of Java MIDlets this week. On certain implementations the permissions to ask for in the MIDlet-Permissions: attribute of your JAD file are not exactly the same as mentioned in the JSR's.

For Instance, I kept getting a Security Exception while trying to access the camera on the device (JSR 135). I had everything in place. The MIDlet was signed and I was even asking for permission to capture frames from the camera.

javax.microedition.media.control.VideoControl.getSnapshot

I believe the specs on JSR 135 state that this is the permission to ask at install time but they don't mention that on certain implementations you might also want to also add permissions for other classes in a "protected package". This is the part that sucks, the specs on the JSR are too vague and give a lot of freedom to the implementers. This is good in a way cause the implementation of KVM on a device also has to take into consideration the device limitations and the carrier requirements but to a lowly developer like me .. it sucks big time. Had to add these permissions to the Jad file to finally get the MIDlet to run on the device (Thanks to some help from the Carrier support after 2 frustrating days)

javax.microedition.media.Player
javax.microedition.media.Manager


For more info on the security architecture of J2ME : Article in Sun's J2ME section

Monday, September 26, 2005

Motichoor : Get a Desi Touch

Pretty nice collection of Tshirts from Tantra and Barking Dog. I love the name 'motichoor' though... excellent name for a shopping portal with a desi touch.

Sunday, September 25, 2005

Magic Weekend

week·end (wēk'ĕnd')
The end of the week, especially the period from Friday evening through Sunday evening.

mag·ic (măj'ĭk)
A mysterious quality of enchantment.

[definitions from Answers.com]

A weekend becomes a "Magic Weekend" when on Sunday evening while rushing through your laundry in laundromat you have a smile on your face. The smile of satisfaction of having done away with the little "TODO's" that keep piling on.

I have a few "TODO's" piling up in post-its on my screen and have been waiting for a weekend to take care of them but for some reason or the other I keep getting out of my jammies. Lets break down a magic weekend for the uninitiated.

Saturday:
Wakup : 10:30 am ...... well 11:00 actually.
Caffiene Fix : Dunkin Donuts and back by... 12:30 pm.
Reflection time: Time spent staring at the computer screen and then looking at the post its selecting the Post it to hit first .... 2:00 pm.
Let the magic begin: work on the thingie till about 5.00 pm .. this is the time u spend downloading the tools you dont have or researching on the gie's that might hit u later.
Nap time : Behind every great piece of code is a short Nap in front of the TV. 5.00 to ....
Free your mind: go out .. dont get drunk.

Sunday:
Session 1: there is just something about starting to work at 1: 00 am ...
Sleepy time: Goto sleep around 4:00 am after 3-4 hours of intensive coding... by this time you have laid all the ground work of your little project and need only minor tweaks here and there.
Wakey wakey : go easy on urself... its a weekend after all.. get up by 12 -1.00 pm,
Caffiene fix: Get ur caffiene fix by around 2:30
Wrap Up time: By this time you are pretty happy with urself and despite the drousy feeling you have already accomplished abt 80 % of the task at hand. Wrap things up ... lets say by 6.00 pm..
Laundry time: Hit the laundromat by 8:00 with a smile on ur face.

Its been quite some time since I spent a weekend like this. Not that I am complaining but would love to have a weekend like this one in a couple of months... a few thingies can only be done on a weekend. Stuff that I need to take care of One by One

1) Screen Gabber Application for taking screenshots. The little module I use at work is good but I do have to go through the trouble of adding it to my applet.

2) Amazon and Ebay seller Applet. Applet allows the user to keep track of stuff (s)he is selling on an online market place.

3) Complete XML parser on BREW. My firm wont buy the one from Reaxion and the one that I wrote for the application is toooo dam specific to the applet. Requires a bunch of changes here and there to make the changes. Need to convert something like expat into BREW. Should add only about 15 kb to my applet binary.. I can live with that.

4) Porting dynamic UI controls to j2me.

Hopefully will have some time in coming 2 weekends to launch the magic mode.