Mobilizing the world

everything that’s mobile, mobile or mobile

 

Handling trackwheel and trackball click events on the BlackBerry

If you want to handle both trackwheel and trackball click events at the same time without using the TrackWheelListener, you have two options:

  • Build the app for 4.1 which will run on most BlackBerries but the navigationClick() won’t receive trackball events (that is, it will be useless on newer devices)
  • Build the app for 4.2 and then you’ll lose a couple of devices (the old ones) but you’ll receive both trackball and trackwheel events

I guess you’ll have to have two binaries if you want to support the older devices as well (those who didn’t update their OSs).

Filed under : blackberry, mobility, programming
By Szabolcs Szekely
On September 30, 2009
At 12:46 pm
Comments : 5
 
 

Nokia2Google

I’ve written a small application (Nokia2Google) that aids Nokia users in copying their contacts to GMail. One might want to do this when moving from a Nokia phone to an Android phone (just as in my case, from E61 to G1) and has to copy the contacts from the Nokia phone to Google, as Android (at least in the G1) uses your Google contacts directly.

I haven’t found one end-to-end solution for this; the closest I got was using the export tool in the Nokia PC Suite and the import tool in GMail. But, of course, the file that PC Suite spits out isn’t exactly what Google expects. This is where my little apps comes in: it converts the PC Suite contacts file into one that Google can import.

Here’s how you should use it:

Step 1.: Syncronize your PC Suite with your phone, to make sure it has all your contacts (I assume you know how to do this). Then, from the Contacts app (part of the Communication Centre, as Nokia likes to call it nowadays) in PC Suite select File / Export and save the comma separated file.

Step 2.: Using Nokia2Google open the previously exported csv file, and just save it as a different file. Conversion to the Google format is automatically done, as you save it.

Step 3.: In the GMail web interface go to Contacts and press the Import button. Select the saved cvs file and confirm the import. And there you go.

The G1 will automatically syncronize (if auto sync is enabled - otherwise you will have to manually sync) with the web and you should have all your GMail contacts on your Android device.

The fields Google uses are quite a bit different from the ones Nokia uses, but about 90% of the data can be correctly transferred to Google contacts (just as an example, Google contacts don’t have a birthday field). If you’re using basic fields (name, address, different kind of phone numbers, notes, etc.) you should be OK.

About the app

Nokia2Google was written in Java, and besides the regular runnable jar there’s a windows executable (with nice icons and all) wrapped using JSmooth. It worked well for me with Nokia PC Suite 7.0.9.2 with contacts from my Nokia E61. I think the cvs formats didn’t change much in time so it should work with other phones/pc suites. Leave a comment if you try it with a different combination or you have some ideas for future development (actually, one idea would be to send the contacts directly to google using the Google Data API; of course, only if there’s enough interest in the app).

Download

Windows executable: .exe
Platform independent jar: .jar

Filed under : mobility, programming, syncronization
By Szabolcs Szekely
On December 11, 2008
At 1:32 am
Comments : 0
 
 

Sun Wireless Toolkit persistence problem

Once in a while my wireless toolkit emulator (wtk 2.5.2) starts behaving like a mad cow. Well, actually, it just forgets what I store in the RMS between emulator runs. The data is stored correctly and is accessible up until I close the emulator and run it again, after which the RMS contents is lost. It’s not a big deal, but a good bunch of other emulators I use can’t persist the RMS between runs at all, so I liked this feature of the WTK.

A quick way to fix this problem is to delete all the data from C:\Users\username\j2mewtk\, as the sdk will recreate these files when you run the emulator again, and from there on it stores the RMS contents correctly.

If someone knows the exact source of this problem (or at least the specific file I need to delete instead of all of the files under j2mewtk), please leave a comment.

Filed under : mobility, programming
By Szabolcs Szekely
On December 2, 2008
At 12:35 pm
Comments :1
 
 

Netbeans “lines of code” counter

I just found a nice netbeans plug-in, which… well, counts lines (and more).

If you need to track your progress, the easiest way is to count the lines of code you write (I know it’s not the best, but it’s the quickest), and this plug-in does just that.

You can get it from the netbeans plug-ins portal (Plugins) or from the author’s page.

After you install it just like any other pmd, you can start it by selecting Window -> Open WordCount Window from netbeans’ menus. After it opens, drag the files you want to analyze from the Projects “window” into the WordCount window and it will automatically scan the files and display the results in the panel below.

Useful.

Filed under : netbeans, programming
By Szabolcs Szekely
On September 28, 2008
At 1:25 pm
Comments : 3