Top Related Projects
Tuta is an email service with a strong focus on security and privacy that lets you encrypt emails, contacts and calendar entries on all your devices.
Email-based instant messaging for Android.
Fully featured, open source, privacy friendly email app for Android
⚠️ Fenix (Firefox for Android) moved to a new repository. It is now developed and maintained as part of: https://github.com/mozilla-mobile/firefox-android
Quick Overview
ProtonMail/proton-mail-android is the official Android application for ProtonMail, a secure email service that prioritizes privacy and encryption. This open-source project allows users to access their ProtonMail accounts on Android devices, providing end-to-end encryption for emails and other security features.
Pros
- Open-source, allowing for community review and contributions
- Implements strong encryption protocols for secure email communication
- Regularly updated with new features and security improvements
- Integrates seamlessly with the ProtonMail ecosystem
Cons
- Limited functionality compared to some mainstream email apps
- May have a steeper learning curve for users new to encrypted email services
- Requires a ProtonMail account to use, not compatible with other email providers
- Some advanced features are only available for paid ProtonMail users
Getting Started
To get started with the ProtonMail Android app:
-
Clone the repository:
git clone https://github.com/ProtonMail/proton-mail-android.git
-
Open the project in Android Studio.
-
Build and run the app on an Android device or emulator.
-
To contribute, fork the repository and submit pull requests with your changes.
Note: This is an Android application, not a code library, so there are no code examples or quick start instructions for integration into other projects.
Competitor Comparisons
Tuta is an email service with a strong focus on security and privacy that lets you encrypt emails, contacts and calendar entries on all your devices.
Pros of Tutanota
- Open-source client and server, allowing for full code audits
- Supports end-to-end encryption for emails, contacts, and calendars
- Uses a unique encryption method that allows searching encrypted data
Cons of Tutanota
- Smaller user base and community compared to Proton Mail
- Limited third-party integrations and add-ons
- Less frequent updates and feature releases
Code Comparison
Tutanota (JavaScript):
crypto.pbkdf2(passphrase, salt, iterations, keyLength, 'sha256', (err, derivedKey) => {
if (err) throw err;
console.log(derivedKey.toString('hex'));
});
Proton Mail (Kotlin):
val derivedKey = PBKDF2WithHmacSHA256.deriveKey(
password = passphrase.toByteArray(),
salt = salt,
iterations = iterations,
keyLength = keyLength
)
println(derivedKey.toHex())
Both projects implement secure key derivation functions, with Tutanota using Node.js crypto module and Proton Mail using a custom Kotlin implementation. Tutanota's approach is more standard and widely used, while Proton Mail's implementation may offer more control over the process.
Email-based instant messaging for Android.
Pros of Delta Chat
- Decentralized architecture using existing email infrastructure
- Open-source and community-driven development
- End-to-end encryption by default
Cons of Delta Chat
- Less polished user interface compared to Proton Mail
- Smaller user base and ecosystem
- Limited advanced features like custom domains or bridge support
Code Comparison
Delta Chat (Kotlin):
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
setupNavigation()
}
Proton Mail (Java):
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
initializeViews();
}
Both projects use similar Android development practices, but Delta Chat is primarily written in Kotlin, while Proton Mail uses Java. Delta Chat's codebase tends to be more concise due to Kotlin's features, while Proton Mail's Java code is more verbose but potentially more familiar to traditional Android developers.
Delta Chat focuses on simplicity and decentralization, making it appealing for privacy-conscious users who prefer open-source solutions. Proton Mail offers a more polished experience with additional features, catering to users who prioritize a comprehensive email service with strong security measures.
Fully featured, open source, privacy friendly email app for Android
Pros of FairEmail
- Open-source and privacy-focused, allowing users to audit the code
- Supports multiple email providers, not limited to a single ecosystem
- Highly customizable with numerous features and settings
Cons of FairEmail
- Less polished user interface compared to Proton Mail
- Steeper learning curve due to extensive customization options
- May lack some of the advanced encryption features of Proton Mail
Code Comparison
FairEmail:
private void handleThreadState(EntityMessage message, JSONObject thread) throws JSONException {
boolean seen = thread.getBoolean("isRead");
boolean flagged = thread.getBoolean("isStarred");
boolean answered = thread.getBoolean("isAnswered");
db.message().setMessageThread(message.account, message.thread, seen, flagged, answered);
}
Proton Mail:
private fun handleMessageState(message: Message, state: MessageState) {
message.isRead = state.isRead
message.isStarred = state.isStarred
message.isReplied = state.isReplied
messageRepository.updateMessage(message)
}
Both repositories handle message state updates, but FairEmail uses Java and works with JSON objects, while Proton Mail uses Kotlin and a custom MessageState object. FairEmail's implementation appears more tightly coupled to the database operations, while Proton Mail's approach seems more abstracted with a separate repository layer.
⚠️ Fenix (Firefox for Android) moved to a new repository. It is now developed and maintained as part of: https://github.com/mozilla-mobile/firefox-android
Pros of Fenix
- Larger and more active community, with more frequent updates and contributions
- Broader scope as a full-featured web browser, offering more functionality
- Extensive documentation and well-organized codebase
Cons of Fenix
- More complex codebase due to its broader feature set
- Potentially higher resource usage as a full browser compared to a focused email app
- Steeper learning curve for new contributors due to its size and complexity
Code Comparison
Fenix (Kotlin):
class BrowserFragment : BaseBrowserFragment(), UserInteractionHandler {
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View {
return super.onCreateView(inflater, container, savedInstanceState)
}
}
Proton Mail (Java):
public class MailboxFragment extends BaseFragment implements SwipeRefreshLayout.OnRefreshListener {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_mailbox, container, false);
return rootView;
}
}
The code comparison shows that Fenix uses Kotlin, while Proton Mail uses Java. Fenix's codebase appears more modern and concise, leveraging Kotlin's features. Both repositories follow similar architectural patterns for fragment creation, but Fenix's implementation is more streamlined.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Important Note
This repository has been archived. Weâve rebuilt the foundations of the Proton Mail Android app and moved it to a new repository.
All future releases and source code updates will be available here: ProtonMail/android-mail
Thank you for your support and understanding.
Proton Mail for Android
Copyright (c) 2020 Proton AG
License
The code and data files in this distribution are licensed under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See https://www.gnu.org/licenses/ for a copy of this license.
See LICENSE file
Setup
The most straightforward way to build and run this application is to:
- Install Android Studio: https://developer.android.com/studio/install
- Clone the repository. You have two options:
- Use the
Project from version control
in Android Studio, or - Use the
git clone
command and import it into Android Studio
- Use the
- Build and run the app directly in Android Studio
Alternatively, if you want to build the app directly from the command line (or using a different IDE, etc.), you will first need to install the command line tools from: https://developer.android.com/studio#cmdline-tools. Then you will need to install the SDK using the sdkmanager
tool. After cloning the repository with git clone
you will need to edit the local.properties
file so that it points to the location of the SDK. Depending on which operating systems you use, the location of the SDK is usually:
- Windows:
C:\Users\<username>\AppData\Local\Android\sdk
- MacOS:
/Users/<username>/Library/Android/Sdk/
- Linux:
/home/<username>/Android/Sdk/
Then, go to the appâs root directory in the command line tool and run:
./gradlew assembleBetaDebug
adb install ./app/build/outputs/apk/beta/debug/ProtonMail-Android-1.XX.X-beta-debug.apk
Note: In app notifications when building from source
When building from source, in app push notifications for new emails will not work out of the box.
The app uses Google's Firebase Cloud Messaging (FCM) service to deliver push notifications. However, we are not publishing the production version of the configuration files needed to set up this service, because the values specified within are deemed sensitive.
Instead, we publish dummy versions of the files (config/google-services/dummy-google-services.json
and config/google-services/dummy-google-services-beta.json
) which allows you to build the app without push notifications. The dummy files will be copied to the relevant folders once you run the ./gradlew command.
We may offer alternative push notification systems in the future which do not rely on Google services.
Contributions
Contributions are appreciated, but must conform to Proton Guidelines.
Branch naming
Branch names must respect the pattern type/description-of-the-change
.
Type must be one of the following:
chore
for changes not related to the Kotlin source code, for example a change in the build configdoc
for changes related to source code documentation, or external document, like the READMEfeat
for a new feature for the appfix
for bug fixesrefactor
for improving one or more unit of code, without impacting the behaviour of the apptest
for everything related to test ( add a new test suite, add a new test into an already existing test suite or improve/modify the performance or the behaviour of an already existing test )
description of change must be a concise and meaningful description of what is expected by the change apported; words must be separated by a dash -
The whole name of the branch must be lower case.
Commit message
The template for a commit message is the following
<Title of the commit>
#comment <Description of the changes>
Affected: <List of affected classes or behaviours>
Title is required and must start with a capital letter.
#comment
field is optional if the Title can exhaustively explain the changes, otherwise is required. Body of the comment must start with a capital letter.
Affected
is optional and must be a comma separated list of the elements affected by the changes, it could be the name of a class or a behaviour like Encryption, Login flow, LoginActivity.kt
Code style and pattern
The code must conform the standards defined in the files config/CodeStyle.xml
and config/detekt.xml
.
CodeStyle.xml
can be imported in the IDE ( Preferences -> Editor -> Code Style -> Import scheme for IntelliJ and Android Studio ).
Detekt reports can be generated with the command ./gradlew detekt
. Check Detekt GitHub documentation for know how to download and configure the optional IDE plugin.
Copyright (c) 2020 Proton Technologies AG
Top Related Projects
Tuta is an email service with a strong focus on security and privacy that lets you encrypt emails, contacts and calendar entries on all your devices.
Email-based instant messaging for Android.
Fully featured, open source, privacy friendly email app for Android
⚠️ Fenix (Firefox for Android) moved to a new repository. It is now developed and maintained as part of: https://github.com/mozilla-mobile/firefox-android
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot