First of all, I pushed my Firefox app onto the Github repo. I've been trying to get the camera API to work for a while now, and it's still not quite there. The 'Take Picture' button will crash the emulator, and not generate a picture on an actual phone. I'm still not sure why this is, although I assume the emulator crashes because the camera API isn't emulated properly (if at all).
I also have a console on the screen, because my Firefox OS 3.0 device seems to not push console.log output into my laptop's developer console, making it hard to debug why the camera won't work. The console I have on the screen doesn't really work either, because some of my functions are being passed into the camera API, which I'm pretty sure causes my logging code to go out of scope. Scope is really strange in Javascript, so I could be wrong about this.
Also, we looked at self publishing options for Firefox apps (see Finn's post), and the major caveat is that self-published apps can't use privileged APIs. So for example, assuming I got the camera functionality on my app to work, my app wouldn't run properly as a self-published app because I wouldn't have access to the camera APIs. I think we can get around this by pushing and pulling from the repo, and compiling the apps ourselves. There should be a way to push FXOS apps onto your Nexus from the IDE.
Impressive post, Alex! I really like the way you have links to referenced sections of source on github. Highlighting the specific code blocks you are discussing make for an easy read and is a nice touch. Once question about this: are you linking to source in a specific revision, so that it won't break as you make changes later on?
ReplyDeleteI'm delighted to see the development partnership you can Finn are establishing. Please take some time to pass on to him some of the techniques you are using to make your blog posts so much fun to read.