Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

Progressive Web App support by PWA Player

Amit Kumar requested to merge pwa-support into master

Description

This MR is intended to change the way Progressive Web Apps (PWA) is installed and handled by /e/OS. PWA in /e/OS is handled by three different components (mentioned below) each handling different responsibilities.

Related Components

  1. Apps
  2. BlissLauncher
  3. PWA Player

Working Solution

Apps handles the responsibility of fetching the PWA manifest from the server and parse the data. This data is then stored into the database of PWA Player using a Content Provider. If data is successfully inserted into the provider, Apps create a shortcut into the launcher using ShortcutManager API.

When the user launches a shortcut, a dummy activity in Apps is started which in turn passes the data to the PWA Player to run it in a separate task. Whenever a shortcut is removed from the BlissLauncher, it tries to remove it from the PWA player database using Content Resolver.

PWA Player handles the responsibility of running a PWA. It's the responsibility of PWA Player to handle the permissions and manage data on behalf of PWAs because PWAs are not a native android component so they can't handle it themselves.

Related issues

1. e/backlog#1012 (closed) 2. e/backlog#1438 (closed)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Related MRs

https://gitlab.e.foundation/e/apps/BlissLauncher/-/merge_requests/45

https://gitlab.e.foundation/e/apps/pwa-player/-/merge_requests/1

How has this been tested?

  1. Install a PWA from Apps
  2. Play with it just like you do with normal apps.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Edited by Amit Kumar

Merge request reports

Loading