Clone this repo:
  1. 2d3ca93 Load Inbox and First Thread on Init by Alan Gardner · 4 days ago master
  2. 2c50a22 Update draft contents by fetching draft from content provider by Kris Giesing · 5 days ago
  3. 31f0bac Migrate Email to Story Shell by Alan Gardner · 4 days ago
  4. 1296d9d feat(composer/ui): adds minimal UI by Jason Campbell · 13 days ago
  5. 28a411e Try to find a recipient when the input loses focus. by Ian McKellar · 6 days 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.
    • composer: Email composition module, can be launched outside of the email/story flow, instructions here.
    • nav: Navigation module.
    • 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