Firefox for Android: Subscribing to Feeds

Firefox on desktop has nice support for previewing and subscribing to syndication feeds (RSS and Atom). There is even support for creating Live Bookmarks. Firefox for Android does not support anything related to syndication feeds… until now.

We just landed basic support for subscribing to feeds discovered on a web page. This is only initial support, so many things are not supported.

How it works:

  • If feeds are discovered on a page, Firefox will enable a menu action on the URLBar long-tap menu. Yes, we have a URLBar long-tap menu!
  • Tap the “Subscribe to Page” menu action.
  • If there is more than one advertised feed, choose the feed you want.
  • Pick the online web service where you want to add the subscription. The choices really depend on the locale, but initially Google Reader (but not for long) and Yahoo are supported.

The limitations:

  • We only support online web services right now. We are looking into local application support too, but have not seen a universal way of listing feed reader applications. We are working on a proposal and want to get support from native feed reader apps like Feedly and Newsblur.
  • No support for feed previews. No plan to add support
  • No support for adding new web service handlers. We are working to add this support.
  • No support for Live Bookmarks. No plan to add support.

In pictures:

Long-tap on the URLBar


Choose “Subscribe to Page”


Choose the feed


Choose the web service

Following the Firefox for Android Team

On The Web

If you want to stay up to date on any new developments in Firefox for Android (Fennec), check out the new Tumblr and Twitter stream. Lots of updates on what’s landing in Fennec Nightly, tips and tricks and summaries of the Mobile Engineering Team meetings.

Mailing List

We have a new mailing list at mobile-dev-firefox@mozilla.org. The newsgroup at mozilla.dev.platforms.mobile is being closed. Use the new mailing list to following along and give feedback on topics being discussed, or post your own ideas.

On IRC

As always, you can jump on Mozilla IRC and talk directly to the Mobile team in the #mobile channel. This is great if you want to start working on the code, need help writing an add-on, want to help investigate a bug or just rant about some design decision.

Firefox for Android: Running on Android x86

Intel and Lenovo launched the first Android device based on the Intel Atom processor in 2012 at CES. Some of the current Android x86 devices include the Lenovo K800, the Orange San Diego, the ZTE Grand X IN, and the Motorola RAZR i.

Mozilla has been internally testing Android x86 builds of Firefox. Firefox runs really well on the Motorola RAZR i. Once we get Android x86 nightly builds stood up and running automated tests, we’ll start planning for a release.

In the meantime, you can try a developer build of Firefox for Android x86 yourself. Just like the ARM version, Firefox runs on Android 2.2 or higher. It should run fine on the Lenovo K800, which shipped with Android 2.3.7 (Gingerbread).

WARNING: This is not an officially released version of Firefox. It will only run on Intel-based (x86) Android devices.

If you don’t have an Android x86 device, you can still try the build using the Android x86 emulator. It’s the same as standard ARM emulator, but since it’s x86, it runs a lot better on your PC. Just make sure you update your Android SDK so it has the latest AVD images, and make an AVD using the x86 image. Also make sure you enable Use Host GPU as well:

Please let us know how the build works on your Android x86 devices and remember to file bugs.

Firefox for Android: Remote Web Console is Here

I already blogged about support for remote debugging in Firefox for Android. Now we have support for remote Web Console too!

The remote console, like remote debugging, requires using Desktop Firefox to connect to Mobile Firefox over USB using ADB. Remote console is supported in Firefox 19 and newer releases. Here’s a quick guide to getting started:

  1. USB Connection: Connect your Android device running Firefox to a host machine running desktop Firefox using USB. In a terminal, forward the TCP connection using: adb forward tcp:6000 tcp:6000
  2. Firefox Desktop: Use about:config to enable remote debugging. Set the “devtools.debugger.remote-enabled” pref to true. Restart. You should see a “Tools > Web Developer > Remote Web Console” menu.
  3. Firefox for Android: Use about:config to enable remote debugging. Set the “devtools.debugger.remote-enabled” pref to true. Restart.
  4. Firefox Desktop: Choose “Tools > Web Developer > Remote Web Console” and a Remote Connection dialog should open. If you changed none of the other remote debugging preferences, just use the defaults. Press OK.
  5. Firefox for Android: You should see a remote connection prompt appear. Press OK to initialize the connection. You have 20 seconds, by default, to accept the connection. You can retry 3 times.
  6. Firefox Desktop: Once the connection is accepted, you should see a scope prompt. The prompt is used to pick the tab, or global, scope you want to attach to the web console.
  7. Firefox Desktop: After picking a scope, you should see a Web Console window appear.

Once you have the Web Console up and running, you can do pretty much everything the desktop version can do. For example, you can load a web page and monitor the network activity, including viewing the network request details:

You can also use the JS console to execute JS code in the scope of the web page running on the Android device! Pretty cool!

A big thanks goes out to Mihai Sucan, who did a mountain of work to get the Web Console remoted. Mihai also blogged about the remote Web Console and you can find some of the underlying details on the remoting API on MDN.

Happy (remote) Debugging!

Firefox for Android: Remote Debugging is Here

Lucas blogged a while ago about some of the initial work on creating a remote debugging system for Firefox on Android. The desktop patches Lucas mentioned have landed, and remote debugging Firefox for Android is now possible.

Remote debugging requires using Desktop Firefox to connect to Mobile Firefox over USB using ADB. Remote debugging is supported in Firefox 15 and newer releases. Here’s a quick guide to getting started:

  1. USB Connection: Connect your Android device running Firefox to a host machine running desktop Firefox using USB. In a terminal, forward the TCP connection using: adb forward tcp:6000 tcp:6000
  2. Firefox Desktop: Use about:config to enable remote debugging. Set the “devtools.debugger.remote-enabled” pref to true. Restart. You should see a “Tools > Web Developer > Remote Debugger” menu.
  3. Firefox for Android: Use about:config to enable remote debugging. Set the “devtools.debugger.remote-enabled” pref to true. Restart.
  4. Firefox Desktop: Choose “Tools > Web Developer > Remote Debugger” and a Remote Connection dialog should open. If you changed none of the other remote debugger preferences, just use the defaults. Press OK.
  5. Firefox Desktop: You should see an empty debugging window appear.
  6. Firefox for Android: You should see a remote debugging connection prompt appear. Press OK to initialize the connection. You have 3 seconds, by default, to accept the connection. You can retry 3 times.
  7. Firefox Desktop: Once the connection is accepted, the empty debugging window will fill with scripts running in the Firefox for Android web page.

Thanks to Lucas, Panos Astithas and the rest of the DevTools team for making this happen. Happy Debugging!

Firefox for Android: Docs for Building Add-on

I have talked about how add-ons interact with the new Firefox on Android, but we didn’t have any easily accessible documentation. Now we have some guides and code snippets:

Feel free to help make the MDN documents better!

Remember, the basics of building an add-on for Firefox on Android is no different than building an add-on for Firefox on Desktop.

I also added a basic restartless add-on skeleton for Firefox on Android on github.

Firefox for Android: Fx & Mobile Work Week

The Mobile team spent last week in not-so-sunny Toronto, pushing Firefox for Android closer to beta-level release criteria. We are getting very close. There is a lot of amazing work landing, especially in graphics. The Graphics team is working with Mobile to integrate GL support into the Gecko rendering system. It’s taken some time, but the results are really starting to look good in Nightly builds.

Mobile wasn’t the only team meeting in Toronto. The Firefox team also got together, and one of main features of the week was HACKING. Pure, seat-of-the-pants hacking. A few of the Mobile team were able to take part in the hack sessions too:

  • Lucas created a nice prototype of the new Reader Mode in Firefox Mobile. He integrated some of the readability code, created a special viewer and a way to manage reading lists.
  • Margaret has a work-in-progress of HTML5 context menu support working.
  • Margaret also updated a patch to add support for the site identity UI.
  • Sriram started work to support text selection in web page content.
  • Jan Odvarko (DevTools) created a prototype of a remote network monitor tool working with Firefox on Android. With the new remote JS debugger, that’s two new remote development tools in the pipeline.

Firefox for Android: After the Reboot

I was asked to give a presentation on the recent developments in Firefox Mobile for the Mozilla Vision 2012 conference in Tokyo. It gave me a chance to reflect a bit on what we did, why we did it and how things are going. The “what” in this case is rewriting the UI for Firefox Mobile using native Android widgets. The “why” can be summed up in the following goals:

  • Faster start-up time
  • Support for Flash
  • Use less memory

We have been fairly “heads down” working on native Firefox for Android over the last 3 months. Re-writes are scary. It’s a race to re-implement existing functionality while adding all new bugs. We are finally to the point in the project where things are settling down. We are focused on stability issues, getting ready to release the native version to a larger audience. As for the primary goals, we have good news:

  • Start-up time is many times faster than the XUL version. Launching via the icon is almost instantaneous.
  • Flash is supported on Froyo and Gingerbread. We need to reverse engineer the changes made for Honeycomb and ICS. There is no documentation for this work.
  • With a single-process, we have reduced memory quite a bit. We still can get killed in the background by Android – it’s supposed to do this – but when this happens, we start up very quickly and restore your session.
  • We still support add-ons using the native UI!

I’m looking forward to being able to move forward again, designing/implementing new features on a solid foundation. We have plenty of new experiments and projects waiting to move forward.

Mozilla Vision 2012 was a great conference and very well attended. I’m very glad I had the chance to participate. Here is the link to my Google Docs presentation. It has a bit more details.

… and go grab a Nightly and see the changes for yourself!

Firefox for Android: Where’s the Error Console?

The new native Android UI version of Firefox does not ship with a dedicated Error Console. Instead, all console messages are redirected to the Android system log – also known as logcat. If you have the Android SDK installed, you already have a way to view the logcat:


# show the complete log
adb logcat

# show only Firefox log messages
adb logcat | grep "Gecko"

# show only Firefox error console messages
adb logcat | grep "GeckoConsole"

The Android stock browser also does the same thing. If you don’t have the Android SDK installed, you can install an Android app, like aLogCat, to scan the log instead.

Firefox for Android does support console API. You can use the API to send data to logcat from your web pages:


// Outputs a message. See also: info, warn, error, debug
console.log("value=", x);

// Outputs a simple call stack from where the call is executed
console.trace();

// Outputs results of a timer
console.time("my-timer");
console.timeEnd("my-timer");

Firefox for Android: Nightly Channel Switches to Native UI Builds

We have been talking a lot recently about the new native UI version of Firefox for Android. Built using native Android UI widgets, packed with major speed improvements and large memory reductions. We have not been working on the project very long, but we have been making solid progress. We decided it’s time to move the native builds into our nightly delivery channel.

The nightly channel is a snapshot of our very latest development work, before it is ready for widespread testing. This is our least stable update channel, and is not recommended for most users. Nightly will offer to update itself automatically, once a day, with the latest changes. If you have a nightly Firefox installed on your Android device, when it updates on November 23rd, you’ll be running the new native UI build.

The XUL-based version of Firefox had several years of development and the nightly builds have a relatively high level of stability. The new native UI builds are not that mature and you will find some OMGWTFBBQ flaws. We have a quick summary of known issues on the Nightly download page. I’ll call out a few of the big ones here:

  • Sync is not supported yet: Sync is also being refactored for the move to native and isn’t ready yet.
  • Panning and zooming have issues: Pages layout too wide for phones and zooming results in fuzzy content. These are our highest priority items and we are landing improvements everyday.
  • Tablet UI is not ready: We are focused on phones and the tablet UI has not caught up. Tablet UI is not a high priority for the native UI project since we can fallback to shipping the XUL-based version on tablets until we have a solid native tablet UI.
  • Bookmarks and History are saved to the system storage: We save bookmarks and history in the same storage that the stock Android browser uses. It provides tighter integration, but does mean the data is not locked away in a Firefox-only location. Passwords and other data are stored in a Firefox-only location.

If any of these issues make you uncomfortable or you are worried about the changes in stability, we urge you to move to the more stable Aurora channel. The Aurora channel is still the XUL-based Firefox you have been using.

We certainly hope you give the new nightly a chance and help us improve the quality and stability by filing bugs.

Note: If you have been using the native UI builds, especially on a tablet, we recommend uninstalling and re-installing the current nightly.