Community:SummerOfCode17/AndroidWebExtensions: Difference between revisions

No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 30: Line 30:
|-
|-
! API
! API
! Description / Hints
|-
|-
| [https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/contextMenus contextMenus]
| [https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/contextMenus contextMenus]
| An API for adding items to the browser's context menu. Fennec already has a legacy API for context menus ([https://developer.mozilla.org/en-US/Add-ons/Firefox_for_Android/API/NativeWindow#contextmenus 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.
|-
|-
| [https://developer.chrome.com/extensions/browsingData browsingData]
| [https://developer.chrome.com/extensions/browsingData 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.
|-
|-
| [https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/identity identity]
| [https://developer.chrome.com/apps/identity identity]
|-
| (See API docs)
| [https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/proxy proxy]
|-
|-
| [https://developer.chrome.com/extensions/proxy proxy]
| Implementing this API can be tricky: Most requests are performed by [https://developer.mozilla.org/en-US/docs/Mozilla/Gecko 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 ==
== 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.
{| class="standard-table" border="1" style="border-collapse: collapse"
|-
! Type
! Task
! Description
|-
| Feature
| [https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Implement_a_settings_page 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
|-
| <s>Feature</s>
| <s>'''[https://github.com/mozilla/web-ext/issues/737 web-ext - Android support]'''</s>
| <s>[https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Getting_started_with_web-ext web-ext] is a tool for building/packaging and deploying WebExtensions. Currently it doesn't support installing WebExtensions on a connected Android device.</s>
''This is already in progress''
|-
| Feature
| '''Log view'''
| A popular add-on for debugging issues with Firefox for Android is [https://addons.mozilla.org/en-US/android/addon/logview/ LogView]. Currently it is not possible to implement such an add-on with WebExtensions. Instead this could be integrated into Firefox (on about:support). [https://mail.mozilla.org/pipermail/mobile-firefox-dev/2017-March/002229.html See discussion on mailing list].
|-
|}


== Application ==
== 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 [https://developer.mozilla.org/en-US/Add-ons/WebExtensions good docs on MDN]).
* Write a WebExtension for Firefox for Android ([http://www.arewewebextensionsyet.com/ Make sure the APIs you need are already supported).]
* [https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_for_Android_build 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 ==
== FAQ ==
118

edits