Wednesday, February 18, 2015

Changes 2/18/15 - Github updates, Self Publishing

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.

Friday, February 13, 2015

Changes 2/13/15 - Bower installation

In order to use the Firefox OS ui elements, I have to install this thing called bower, which I guess gives me all the resources I need.

First, I installed Node.js for windows.  Next, I used the npm package manager built into Node to install bower.  I then used bower (which is its own package manager) to install the resources mentioned in the firefox tutorials, such as this one.

Everything is installing just fine, but I don't know where the bower stuff is installing to, and so I can't get the css and other stuff into my project folder.

Thursday, February 12, 2015

Changes 2/11/15 and 2/12/15 - Sick days

I've been sick the past two days, so I obviously didn't do much.

I did start looking into jQuery mobile, and played around with the theme creator webapp they have, which is pretty cool.  This is my first attempt at a theme (they will break this link after 30 days).  It's not the best, but their app also wasn't that helpful for fine tuning the colors, since it got really hard to see which one was which in the tiny little color picker they have.

Actually looking at it, Mozilla has their own UI library that I should probably use instead of jQuery mobile to keep the interface consistent.

Tuesday, February 10, 2015

Changes 2/10/15 - Firefox OS and Github

I kept going with my attempts to understand the camera API.  I used Finn's Flame device today because it has OS 2.2, and console.log works with the web console.

Now I can see this on my computer:


I'm stuck though, because everything seems to work, but the image doesn't show up in the gallery and I don't know how to reference it yet.  However, it appears to be going through all the steps correctly, and just failing to write to the file.

Monday, February 9, 2015

Changes 2/9/15 - Firefox OS difficulties

Today Jack "kindly" made an unboxing video of our new Firefox Phone for us, which turned out surprisingly well considering he edited the whole thing on his iPhone.

I also realized that in Firefox OS 3.0, #console.log output isn't sent to the web console, which is frustrating.  In Firefox OS 2.2, which is what I am running on the emulator, it seems to work fine.

However, I'm trying to get the camera to work, and accessing the camera causes the emulator to crash.  I think my best bet is to downgrade to version 2.2.

I also set up a github repo that Finn cloned off of.

Changes 2/5/15 (forgot to post this one) - Firefox OS

Now that I have the actual Flame phone, I can push my apps onto it and try them out on the hardware. It's actually really cool because you can use Firefox developer tools on the phone while it is running, so you can see what things look like on the actual hardware in real time. I didn't get too much done today because styling and getting stuff to look good takes a really long time, especially when you don't know what you want or what you are doing.
I started a new app and put my buttons in, but I'm not sure where to go from there. Additionally, it's hard to figure out how I want the layout to be. For instance, I haven't decided on the size of the buttons and whether they should be in a single row or have multiple side by side.

Friday, February 6, 2015

Changes 2/6/15 - Bad Documentation

Getting access to hardware features on Firefox OS is really tough, because I find the documentation to be pretty confusing.  A lot of times I'm not sure whether I'm looking at documentation for the browser firefox or firefox OS, and it seems like there are several different methods for accessing the camera, but only one of them works on the Flame.  Additionally, console.log() doesn't log to the web console, but instead logs to the device for some reason, so I have to install adb and use logcat to read the logs.  This is annoying because in trying to figure out whether the approach I'm using to take pictures is working, I'd like to be able to log to the web console in real time.