Development
Documentation

Development

This section of the documentation covers information for developers.

Getting Started

To develop K-9 you need a working understanding of:

With just Java knowledge you may be able to make minor logic changes and small fixes. But the Android APIs are used extensively (as well as Android based libraries), particularly in the front-end.

XML provides the translation (however that’s pulled in from Transifex anyway) and some of UI layout.

Once you’ve gained a solid understanding of these we recommend you look at our existing issues and pick one tagged ‘good first issue’. If there’s not a tagged one not being worked on then feel free to pick an issue that interests you. If there’s no developer comments on the issue you select (and it’s not marked beginner) feel free to ask about the best approach before you start!

To build the project simply clone the repository and import the project into Android Studio. From there you can use the IDE tools to build the k9mail APK and install it.

Architecture

The general structure of K-9 is as follows:

Modules:

Core Design

There are many parts to K-9. This list gives a rough outline of some of them.

Activity Layouts

This section highlights some of the layout files in use.

Scheduling & System Intents

K-9 currently uses the AlarmManager API for scheduling tasks related to fetching email

Classes

Intents

Database

Each LocalStore has a separate LockableDatabase which controls access to an SQLiteDatabase. Hence querying multiple accounts requires accessing separate database files. The database is stored by a StorageProvider (of which there are several types with specific support for Samsung Galaxy and HTC devices).

Tables

Third Party Integration

K-9 is built on Android, as such it uses two main methods of providing an interface for external applications: