Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 2.27 KB

File metadata and controls

47 lines (32 loc) · 2.27 KB

Android Components > Feature > P2P

A feature that enables sharing of URLs and web pages through peer-to-peer wifi connections. Because this does not inline external references to images and CSS, the page on the recipient device will lack those features unless connected to the Internet. It works best in conjunction with feature-readerview.

Usage

Setting up the dependency

Use Gradle to download the library from maven.mozilla.org (Setup repository):

implementation "org.mozilla.components:feature-p2p:{latest-version}"

Sample usage

The P2P toolbar has been integrated into samples/browser. Key files are:

Structure

The structure of the feature is shown in this block diagram:

block diagram

"Freeze-drying" a web page

An experimental fork uses the external library freeze-dry to package up the entire web page. This version was not checked in to this repository because reviewing all of the JavaScript code was infeasible. Performance was also an issue.

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/