NetBeans with NBandroid, Emulator Never Shows After Building/Running With F6

Trying to build my first (or second, I tend to forget) Android project under NetBeans, I ran into an issue where the emulator would never show up when I tried to build the project. Turns out I even got a null pointer exception which I thought were generated somewhere else in NetBeans (next time: read the actual exception and don’t assume).

The solution to fix the emulator never showing up? Update the currently installed version of the JDK. (Thanks to a Stackoverflow thread for hinting in the correct direction) Remember that NetBeans might be tied to a particular version of the JDK (either in the command line arguments or in netbeans.conf in the etc/ directory of the NetBeans installation directory). I uninstalled any older version, which gave me an error about the value of jdkhome being wrong, and asking if I wanted to use the default path instead. That worked, but the error shows up each time. Comment out the jdkhome-line in netbeans.conf and it’ll guess automagically each time (if guessing works for you), or if guessing doesn’t work, add the new path to the JDK in netbeans.conf.

Extending HTML for Devices with Built-in Cameras

(I wrote this back in september. No idea why WordPress decided to not publish it. Oh well. It’s still interesting.)

Ajaxian has a post up about a hack Brad Lassey created for the Mozilla mobile browser (Fennec). The strategy shows the video feed from the built-in camera of the phone, and allows the user to take a shot and upload the image. Simple enough, but the idea to evolve HTML to allow this kind of interaction by extending the type-attribute of the input element seems like a good idea. We’ve been experimenting quite a bit with ways of uploading and getting this kind of information from the users previously, in particular in the BTDT – Been There Done That – project at Østfold College University in the Mobile Applications Group.

Christer and I are currently looking into some of these ideas for at least one of the sites we’re playing with. This will allow people to very easily get this kind of functionality by using standarized HTML attributes, instead of having to write the same boilerplate code over and over again. J2ME has loads of security exceptions and Python for Series 60, however ingenious for development work, has a few deployment problems (the size, in particular), so just relying on simple HTML and javascript would be great. Well, the browsers embedded on the phones will probably be just as different as always, so we’ll still be left with “things that just work on a few lucky devices”. The closest today seems to be email and MMS, so I guess we’ll have to go down that roadfor now.