Clone this repo:
  1. b3e6e19 feat(composer): add compostion module by Jason Campbell · 14 days ago master
  2. 908810a fix(email_api): remove unused ClientId by YoungSeok Yoon · 8 days ago
  3. b3225e4 Use the new Auth service to get email related tokens instead of by Alhaad Gokhale · 4 weeks ago
  4. 8a762e5 fix(flutter): Flutter elevation API change by Jason Campbell · 3 weeks ago
  5. d5467fd Using Maxwell URI decomposition by Ross Wang · 3 weeks ago

Email

Status: Experimental

Structure

This repo contains code for running a vanilla Flutter application (iOS & Android) and a Fuchsia specific set of modules.

  • agents: Fuchsia agents (background services) using Modular APIs.
    • content_provider: The email content provider agent which communicates with the cloud email services.
  • modules: Fuchsia application code using Modular APIs.
    • nav: Navigation module.
    • session: The Email Module responsible for managing UI state between modules.
    • story: The top-level email “Story” and primary entry point for the full Email experience.
    • thread_list: The list of Threads.
    • thread: A single Email Thread.
  • packages: Common Dart packages used by email agents / modules.
  • services: FIDL service definitions.

Setup

Checkout

This repo is already part of the default jiri manifest.

Follow the instructions for setting up a fresh Fuchsia checkout. Once you have the jiri tool installed and have imported the default manifest and updated return to these instructions.

It is recommended you set up the Fuchsia environment helpers in scripts/env.sh:

source scripts/env.sh

Device Setup

The series of modules that compose Email share data through Links. Links allow the shared state between Modules to be persisted between between device reboots and across devices.

In order to enable the desired behavior some configuration is required for the device that the Email modules will be running on. The best way to set up persistent device storage is to use the Fuchsia installer.

  1. Setup an Acer.
  • Ensure you can netboot.
    • cd $FUCHSIA_DIR # Or fgo
    • fset x86-64 --modules default
    • fbuild
    • fboot
  • Setup the Fuchsia Installer, this will setup data partitions on the device.
  • Ensure that data persists between device reboots, in the Acer's terminal:
    • touch /data/foobar
    • dm reboot
    • Wait for the device to reboot.
    • ls /data
    • If everything went well you will see /data/foobar!
    • See the MinFS document to learn more about the filesystem.
  • Enable Ledger's Cloud Sync. NOTE: Ledger data syncing is not secure, only login with test accounts.

Workflow

There are Makefile tasks setup to help simplify common development tasks. Use make help to see what they are.

When you have changes you are ready to see in action you can build with:

make build # or fset x86-64 --modules default && fbuild

Once the system has been built you will need to run a bootserver to get it over to a connected Acer. You can use the env.sh helper to move the build from your host to the target device with:

freboot

Once that is done (it takes a while) you can run the application with:

make run

You can run on a connected android device with:

make flutter-run

Optional: In another terminal you can tail the logs

${FUCHSIA_DIR}/out/build-magenta/tools/loglistener