Skip to content

A collection of Android libraries to build browsers or browser-like applications.

License

Notifications You must be signed in to change notification settings

ligi/android-components

Β 
Β 

Android components

Task Status codecov Bors enabled Gitter

A collection of Android libraries to build browsers or browser-like applications.

ℹ️ For more information see the website.

A full featured reference browser implementation based on the components can be found in the reference-browser repository.

Getting Involved

We encourage you to participate in this open source project. We love pull requests, bug reports, ideas, (security) code reviews or any kind of positive contribution.

Before you attempt to make a contribution please read the Community Participation Guidelines.

Maven repository

All components are getting published on maven.mozilla.org. To use them, you need to add the following to your projects top-level build file, in the allprojects block (see e.g. the reference-browser):

repositories {
    maven {
       url "https://maven.mozilla.org/maven2"
    }
}

Snapshot builds

Snapshots are build daily from the master branch and published on snapshots.maven.mozilla.org.

API Reference

The API reference docs are available at mozac.org/api/.

Components

  • πŸ”΄ In Development - Not ready to be used in shipping products.
  • βšͺ Preview - This component is almost/partially ready and can be tested in products.
  • πŸ”΅ Production ready - Used by shipping products.

Browser

High-level components for building browser(-like) apps.

  • βšͺ Awesomebar - A customizable Awesome Bar implementation for browsers.

  • πŸ”΅ Domains Localized and customizable domain lists for auto-completion in browsers.

  • βšͺ Engine-Gecko - Engine implementation based on GeckoView (Release channel).

  • βšͺ Engine-Gecko-Beta - Engine implementation based on GeckoView (Beta channel).

  • βšͺ Engine-Gecko-Nightly - Engine implementation based on GeckoView (Nightly channel).

  • βšͺ Engine-System - Engine implementation based on the system's WebView.

  • πŸ”΅ Errorpages - Responsive browser error pages for Android apps.

  • πŸ”΄ Icons - A component for loading and storing website icons (like Favicons).

  • βšͺ Menu - A generic menu with customizable items primarily for browser toolbars.

  • πŸ”΅ Search - Search plugins and companion code to load, parse and use them.

  • πŸ”΅ Session - A generic representation of a browser session.

  • πŸ”΄ Storage-Memory - An in-memory implementation of browser storage.

  • βšͺ Storage-Sync - A syncable implementation of browser storage backed by application-services' Places lib.

  • πŸ”΄ Tabstray - A customizable tabs tray for browsers.

  • βšͺ Toolbar - A customizable toolbar for browsers.

Concept

API contracts and abstraction layers for browser components.

  • βšͺ Awesomebar - An abstract definition of an awesome bar component.

  • βšͺ Engine - Abstraction layer that allows hiding the actual browser engine implementation.

  • βšͺ Fetch - An abstract definition of an HTTP client for fetching resources.

  • πŸ”΄ Push - An abstract definition of a push service component.

  • βšͺ Storage - Abstract definition of a browser storage component.

  • πŸ”΄ Tabstray - Abstract definition of a tabs tray component.

  • βšͺ Toolbar - Abstract definition of a browser toolbar component.

Feature

Combined components to implement feature-specific use cases.

  • πŸ”΄ Accounts - A component that connects an FxaAccountManager from service-firefox-accounts with feature-tabs in order to facilitate authentication flows.

  • βšͺ Awesomebar - A component that connects a concept-awesomebar implementation to a concept-toolbar implementation and provides implementations of various suggestion providers.

  • βšͺ Context Menu - A component for displaying context menus when long-pressing web content.

  • πŸ”΄ Custom Tabs - A component for providing Custom Tabs functionality in browsers.

  • βšͺ Downloads - A component to perform downloads using the Android downloads manager.

  • πŸ”΄ Intent - A component that provides intent processing functionality by combining various other feature modules.

  • πŸ”΄ Progressive Web Apps (PWA) - A component that provides functionality for supporting Progressive Web Apps (PWA).

  • πŸ”΄ Reader View - A component that provides Reader View functionality.

  • βšͺ QR - A component that provides functionality for scanning QR codes.

  • πŸ”΄ Search - A component that connects an (concept) engine implementation with the browser search module.

  • πŸ”΄ SendTab - A component for sending tabs to other devices with a registered FxA Account.

  • βšͺ Session - A component that connects an (concept) engine implementation with the browser session and storage modules.

  • πŸ”΄ Sync -A component that provides synchronization orchestration for groups of (concept) SyncableStore objects.

  • πŸ”΄ Tabs - A component that connects a tabs tray implementation with the session and toolbar modules.

  • πŸ”΄ Tab Collections - Feature implementation for saving, restoring and organizing collections of tabs.

  • πŸ”΄ Toolbar - A component that connects a (concept) toolbar implementation with the browser session module.

  • βšͺ Prompts - A component that will handle all the common prompt dialogs from web content.

  • βšͺ Push - A component that provides Autopush messages with help from a supported push service.

  • βšͺ Find In Page - A component that provides an UI widget for find in page functionality.

  • πŸ”΄ Site Permissions - A feature for showing site permission request prompts.

  • πŸ”΄ Web Notifications - A component for displaying web notifications.

  • πŸ”΅ WebCompat - A feature to enable website-hotfixing via the Web Compatibility System-Addon.

UI

Generic low-level UI components for building apps.

  • πŸ”΅ Autocomplete - A set of components to provide autocomplete functionality.

  • πŸ”΅ Colors - The standard set of Photon colors.

  • πŸ”΅ Fonts - The standard set of fonts used by Mozilla Android products.

  • πŸ”΅ Icons - A collection of often used browser icons.

  • βšͺ Tabcounter - A button that shows the current tab count and can animate state changes.

Service

Components and libraries to interact with backend services.

  • πŸ”΅ Firefox Accounts (FxA) - A library for integrating with Firefox Accounts.

  • πŸ”΅ Firefox Sync - Logins - A library for integrating with Firefox Sync - Logins.

  • πŸ”΅ Fretboard - An Android framework for segmenting users in order to run A/B tests and roll out features gradually.

  • πŸ”΄ Glean - A client-side telemetry SDK for collecting metrics and sending them to Mozilla's telemetry service (eventually replacing service-telemetry).

  • πŸ”΄ Experiments - An Android SDK for running experiments on user segments in multiple branches.

  • βšͺ Location - A library for accessing Mozilla's and other location services.

  • πŸ”΄ Pocket - A library for communicating with the Pocket API.

  • πŸ”΅ Telemetry - A generic library for sending telemetry pings from Android applications to Mozilla's telemetry service.

Support

Supporting components with generic helper code.

  • πŸ”΅ Android Test - A collection of helpers for testing components in instrumented (on device) tests (src/androidTest).

  • πŸ”΅ Base - Base component containing building blocks for components.

  • πŸ”΅ Ktx - A set of Kotlin extensions on top of the Android framework and Kotlin standard library.

  • βšͺ Migration - Helper code to migrate from a Fennec-based (Firefox for Android) app to an Android Components based app.

  • πŸ”΅ Test - A collection of helpers for testing components in local unit tests (src/test).

  • πŸ”΅ Test Appservices - A component for synchronizing Application Services' unit testing dependencies used in Android Components.

  • πŸ”΅ Utils - Generic utility classes to be shared between projects.

  • πŸ”΅ Webextensions - A component containing building blocks for features implemented as web extensions.

Standalone libraries

Tooling

  • πŸ”΅ Fetch-Tests - A generic test suite for components that implement concept-fetch.

  • πŸ”΅ Lint - Custom Lint rules for the components repository.

Sample apps

Sample apps using various components.

  • Browser - A simple browser composed from browser components. This sample application is only a very basic browser. For a full-featured reference browser implementation see the reference-browser repository.

  • Crash - An app showing the integration of the lib-crash component.

  • Firefox Accounts (FxA) - A simple app demoing Firefox Accounts integration.

  • Firefox Sync - A simple app demoing general Firefox Sync integration, with bookmarks and history.

  • Firefox Sync - Logins - A simple app demoing Firefox Sync (Logins) integration.

  • Toolbar - An app demoing multiple customized toolbars using the browser-toolbar component.

  • DataProtect - An app demoing how to use the Dataprotect component to load and store encrypted data in SharedPreferences.

  • Glean - An app demoing how to use the Glean library to collect and send telemetry data.

Building

Command line

$ git clone https://github.com/mozilla-mobile/android-components.git
$ cd android-components
$ ./gradlew assemble

Android Studio

If the environment variable JAVA_HOME is not defined, you will need to set it. If you would like to use the JDK installed by Android Studio, here's how to find it:

  1. Open Android Studio.
  2. Select "Configure".
  3. Select "Default Project Structure". You should now see the Android JDK location.
  4. Set the environment variable JAVA_HOME to the location. (How you set an environment variable depends on your OS.)
  5. Restart Android Studio.

Once the environment variable is set, you can import the project into Android Studio with the default wizard options.

License

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/

About

A collection of Android libraries to build browsers or browser-like applications.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 84.9%
  • JavaScript 10.7%
  • Java 3.4%
  • Python 0.5%
  • CSS 0.3%
  • Shell 0.1%
  • Other 0.1%