Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Porting A PhoneGap App To Firefox OS

DZone's Guide to

Porting A PhoneGap App To Firefox OS

· Mobile Zone
Free Resource

Get gorgeous, multi-touch charts for your iOS application with just a few lines of code.

About a year ago I released the Fresh Food Finder, a multi-platform mobile application built with PhoneGap. The Fresh Food Finder provides an easy way to search for farmers markets near your current location, based on the farmers markets listings from the USDA. This app has seen a lot of popularity lately, so I’m working on a new version for all platforms with a better data feed, better UI, and overall better UX – unfortunately, that version isn’t ready yet. However, I have been able to bring it to an additional platform this week: Firefox OS!

Fresh Food Finder on iOS, Firefox OS, & Android

Fresh Food Finder on iOS, Firefox OS, & Android

PhoneGap support is coming for Firefox OS, and in preparation I wanted to become familiar with the Firefox OS development environment and platform ecosystem. So … I ported the Fresh Food Finder, minus the specific PhoneGap API calls. The best part (and this really shows the power of web-standards based development …) is that I was able to take the existing PhoneGap codebase and turn it into a Firefox OS app AND submit it to the Firefox Marketplace in under 24 hours! If you’re interested, you can check out progress on Firefox OS support in the Cordova project, and it will be available on PhoneGap.com once it’s actually released.

So, on to the app (you can download the Fresh Food Finder in the Firefox Maketplace here) …

Basically, I commented out the PhoneGap-specific API calls, added a few minor bug fixes, and added a few Firefox-OS specific layout/styling changes (just a few minor things so that my app looked right on the device). Then you put in a mainfest.webapp configuration file, package it up, then submit it to the app store. Check it out in the video below to see it in action, running on a Firefox OS device …

The phone I am using is a Geeksphone Firefox OS developer device. It’s not a production/consumer model, so there were a few hiccups using it, but overall it was a good experience. Also, many thanks to Jason Weathersby from Mozilla for helping me get the latest device image running on my phone.

You can learn more about getting started with Firefox OS development here:

Also, be sure to check out the Fresh Food Finder:

Enjoy!



.Net developers: use Highcharts, the industry's leading interactive charting library, without writing a single line of JavaScript.

Topics:

Published at DZone with permission of Andrew Trice, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}