Community:SummerOfCode17/AndroidWebExtensions

From MozillaWiki
Jump to: navigation, search

WebExtensions are a cross-browser system for developing browser add-ons. But not all APIs are supported by Firefox for Android yet. The goal of this Google Summer of Code project is to implement some of the missing APIs and optionally improve the tooling for building and testing WebExtensions for Firefox for Android.

Helpful resources

Google Summer of Code

Web Extensions

APIs

The following APIs are not implemented yet and are "reserved" for this Google Summer of Code project. You do not need to work on all of them. Pick for your application / proposal pick what you can realistically complete during Summer of Code.

API Description / Hints
contextMenus An API for adding items to the browser's context menu. Fennec already has a legacy API for context menus (See MDN). Hooking up the web extension API to the legacy API should be a good first step. Depending on differences in the APIs additional functionality needs to be implemented.
browsingData API to remove browsing data from a user's profile. Most of the browsing data of Firefox for Android is handled by the Java / Android layer. Implementing this API will require notifying the Java layer via events and then removing the specified data from the profile.
identity (See API docs)
proxy Implementing this API can be tricky: Most requests are performed by Gecko. But there are some requests done by Java / Android. Not all of them honor the proxy settings. Besides implementing this API it might be required to identify requests not using proxies and adding support for that.

Additional tasks

The following tasks are not about WebExtensions API but make using or developing WebExtensions on Android more pleasant. You can pick them for your propsosal - either additionally or instead of APIs that might be too big for your timeline.

Type Task Description
Feature Settings page When adding a settings page to the add-on then this doesn't show up anywhere inside Fennec - even though we already have an add-on details page.
Bug add-on id required Even though the docs say that an add-on id is not needed the installation fails on fennec ("Add-on corrupt") if I do not set one in the manifest
Feature web-ext - Android support web-ext is a tool for building/packaging and deploying WebExtensions. Currently it doesn't support installing WebExtensions on a connected Android device.

This is already in progress

Feature Log view A popular add-on for debugging issues with Firefox for Android is LogView. Currently it is not possible to implement such an add-on with WebExtensions. Instead this could be integrated into Firefox (on about:support). See discussion on mailing list.

Application

Preparation

To understand the problem space and how to work with the Firefox for Android code base you can (but do not need to):

  • Write a WebExtension for Firefox (desktop) or Chrome (It's a bit easier and there are good docs on MDN).
  • Write a WebExtension for Firefox for Android (Make sure the APIs you need are already supported).
  • Build Firefox for Android. Play with the code. Change something in the app.
  • Try to add a simple new WebExtension API to Firefox for Android. For example an API that just writes a string to logcat. Either add a method for that to an existing API or add a completely new namespace for it.
  • Use the new API you implemented from your add-on.

Depending on your experience those tasks can take a long time. Don't worry, you do not need to complete them to apply. However working on them will help you understand what is needed to work on this project and what you can realistically achieve during the summer. Use this to write a good proposal that shows that you understand what is needed and with deliverables that are achievable in your timeline.

FAQ

Should I apply for other GSoC projects or at other organizations?

Yes, you can and you should if there are other projects you are interested in. Last year there have been about 30 applications for Mozilla's Android project.

Are there other Android projects Mozilla mentors?

No. This project here is the only Android project mentored by Mozilla this year.