One ongoing goal of the Firefox for Android team is it to reduce the APK size (See meta bug "fatfennec": bug 942609). We just made the first steps to stop shipping everything in the APK and instead download assets the application needs at runtime. We started with fonts but we want to move much more content out of the APK (hyphenation dictionaries, translations, ..).
The goal of this Google Summer of Code project is it to remove hyphenation dictionaries from the APK and download them at runtime. The work previously done to exclude fonts acts as a blueprint and for your guidance.
- Mentor: Sebastian Kaspari (:sebastian) <email@example.com>
- IRC: irc.mozilla.org #mobile
Next step: March 14 - 25, 2016 - Students can register and submit their applications to mentor organizations. (Application Advice)
Before starting the project and maybe even before applying for GSoC get familiar with the codebase and how to contribute patches to Firefox for Android:
- Build environment: Create a build environment for building Firefox for Android: Simple Firefox for Android build
- A "front-end" build will be enough for most of the tasks and is much faster. However if you are going to edit C++ code you will need to setup a "back-end" build.
- Write patches: To get familiar with the code base, the tools and creating patches, pick one of the mentor bugs that matches your skill set: Bugs Ahoy!
- Those bugs have a mentor assigned. The mentor will help you and answer your questions.
- For downloading fonts at runtime we implemented a background service that uses a static catalog of downloadable content. See dependency tree.
- Currently in development is a client that synchronizes the catalog of downloadable content from a Kinto server. See Bug 1201059
- Create a build without hyphenation dictionaries (MOZ_EXCLUDE_HYPHENATION_DICTIONARIES)
- Verify that the build behaves correctly with the absence of the dictionaries (Are pages still readable? No crashes?)
- Create or find a test page that you can use to easily test if a hyphenation dictionary by a build (For testing later).
- Bug 1175555 - Exclude hyphenation dictionaries from builds via build flag - Already done
- Bug 1276586 - Package hyphenation dictionaries for ref tests - See similar bug for fonts: Bug 1197716
- Bug ??? - Verify that (or add code so that) Gecko can load hyphenation dictionaries from a profile independent directory - See similar bug for fonts: Bug 1197717
- Bug Bug 1276589 - Add hyphenation dictionaries to static catalog of downloadable content
- Bug Bug 1276588 - Modify DownloadAction (of DownloadContentService) to handle new type of content
- Bug ??? - Add a way to let Gecko know that the dictionaries have changed and that it should rebuild its list
- Bug Bug 1276587 - Add hyphenation dictionaries to online catalog of content in Kinto
- Bug ??? - Land your changes behind a Nightly flag
- Verify that Nightly behaves correctly and the hyphenation dictionaries are downloaded
- Bug ??? - Let your changes ride the trains
The existing (Java) code for downloadable content can be found in the org.mozilla.gecko.dlc package.
For a very experienced developer the hyphenation dictionaries project could be too small for a 3 month period. You can consider adding one of those projects to your application. However this is something you can pick up later regardless of your application. Do not promise too much before you have actually worked on it. :)
Download localization files at runtime (Bug 945123) There's a follow-up project about adding support for downloading localization files at runtime (). But this project contains much more unknowns and research tasks ("There be dragons!") which makes it hard to estimate.
Create helper class for scheduling background tasks with best available system API (Bug 1248901) We need to run the DownloadContentService regularly. For this and other projects we would like to implement a helper class that can schedule these tasks based on some restraints and with the best available system API (AlarmManager, JobScheduler, GcmNetworkManager).
- There are various open follow-up bugs to improve the background service for downloading content as well as the sync client (Actual list of bugs TBD).
- What are hyphenation dictionaries?
- Hyphenation dictionaries define how words in a specific language can be broken in parts, see Wikipedia. Those are the hyphenation dictionaries in the tree.
- Should I apply for other projects or at other organizations?
Yes, you can and you should if there are other projects you are interested in. This project has caught some interest and there might be multiple applicants. This is the only Android project mentored by Mozilla this year though.