Clone this repo:
  1. e6d79c2 Moved Maxwell to //peridot. by P.Y. Laligand · 9 weeks ago master
  2. 0ec1926 Moved Modular to //peridot. by P.Y. Laligand · 9 weeks ago
  3. 314332c Move dart_content_handler and tonic to //topaz. by P.Y. Laligand · 9 weeks ago
  4. b08ad1a Move modules to //topaz: chat, common, contacts, music, todo, video by P.Y. Laligand · 9 weeks ago
  5. 5b4d484 Rename Magenta to Zircon by George Kulakowski · 2 months 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-zircon/tools/loglistener