Email-based instant messaging for Android.

Overview

Delta Chat Android Client

This is the Android client for Delta Chat. It is available on F-Droid and the Google Play Store. The APK can also be downloaded from GitHub (only for experienced users).

For the core library and other common info, please refer to the Delta Chat Core Library.

Screenshot Chat List Screenshot Chat View

Check Out Repository

When checking out deltachat-android, make sure also to check out the subproject deltachat-core-rust:

  • When using Git, you can do this initially by $ git clone --recursive https://github.com/deltachat/deltachat-android or later by git submodule update --init --recursive. If you do this in your home directory, this results in the folder ~/deltachat-android which is just fine.

Build Using Dockerfile

If you only want to build an APK, the easiest way is to use provided Dockerfile with Docker or Podman. Podman is a drop-in replacement for Docker that does not require root privileges.

If you don't have Docker or Podman setup yet, read how to setup Podman below. If you don't want to use Docker or Podman, read how to manually install the build environment.

First, build the image deltachat-android by running

podman build --build-arg UID=$(id -u) --build-arg GID=$(id -g) . -t deltachat-android

or

docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) . -t deltachat-android

Then, run the image:

podman run --userns=keep-id -it --name deltachat -v $(pwd):/home/app -w /home/app localhost/deltachat-android

or

docker run -it --name deltachat -v $(pwd):/home/app -w /home/app localhost/deltachat-android

You can leave the container with Ctrl+D or by typing exit and re-enter it with docker start -ia deltachat or podman start -ia deltachat.

Within the container, install toolchains and build the native library:

deltachat@6012dcb974fe:/home/app$ scripts/install-toolchains.sh
deltachat@6012dcb974fe:/home/app$ ./ndk-make.sh

Then, build an APK:

deltachat@6012dcb974fe:/home/app$ ./gradlew assembleDebug

Troubleshooting

  • Executing ./gradlew assembleDebug inside the container fails with The SDK directory '/home/user/Android/Sdk' does not exist.:

    The problem is that Android Studio (outside the container) automatically creates a file local.properties with a content like sdk.dir=/home/username/Android/Sdk, so, Gradle-inside-the-container looks for the Sdk at /home/username/Android/Sdk, where it can't find it. You could:

    • either: remove the file or just the line starting with sdk.dir
    • or: run ./gradlew assembleDebug from outside the container (however, there may be incompability issues if different versions are installed inside and outside the container)
  • Running the image fails with ERRO[0000] The storage 'driver' option must be set in /etc/containers/storage.conf, guarantee proper operation.:

    In /etc/containers/storage.conf, replace the line: driver = "" with: driver = "overlay". You can also set the driver option to something else, you just need to set it to something. Read about possible options here.

Setup Podman

These instructions were only tested on a Manjaro machine so far. If anything doesn't work, please open an issue.

First, Install Podman.

Then, if you want to run Podman without root, run:

sudo touch /etc/subgid
sudo touch /etc/subuid
sudo usermod --add-subuids 165536-231072 --add-subgids 165536-231072 yourusername

(replace yourusername with your username). See https://wiki.archlinux.org/index.php/Podman#Rootless_Podman for more information.

Install Build Environment (without Docker or Podman)

To setup build environment manually, you can read the Dockerfile and mimic what it does.

First, you need to setup Android SDK and Android NDK. Configure ANDROID_NDK_ROOT environment variable to point to the Android NDK installation directory. Currently ndk20b is the minimum required version. Newer versions will likely work, however, are not tested and not used in official releases, in general, changes on the ndk-version should be done with care.

Then, install Rust using rustup. Install Rust toolchains for cross-compilation by executing scripts/install-toolchains.sh.

After that, call ./ndk-make.sh in the root directory to build core-rust. Afterwards run the project in Android Studio. The project requires API 25.

With chance, that's it :) - if not, read on how to set up a proper development environment.

Install Development Environment

  1. Some libs required by Android Studio may be missing on 64 bit Linux machines Source], so for Ubuntu execute $ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386 and for Fedora execute $ sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686.

  2. Download Android Studio from https://developer.android.com (android-studio-ide-...-linux.zip) and unpack the archive which contains a single folder called android-studio; move this folder e.g. to ~/android-studio.

  3. To launch Android Studio for the first time, open a terminal, navigate to ~/android-studio/bin, execute ./studio.sh and use all the standard values from the wizard.

  4. Android Studio now asks you if you want to open an existing project; choose ~/deltachat-android as created in the "Build" chapter (Android Studio starts to build the project, however, there are some steps missing before this will succeed).

  5. If components are missing, click on the corresponding error message and install eg. required SDKs and the "Build-Tools" (you should also find the option at "Tools / Android / SDK Manager / SDK Platforms"). Now the build should succeed - but the app still misses the native part.

  6. Download Android NDK from NDK Archives and extract the archive containing a single folder called android-ndk-r…; move this folder e.g. to ~/android-ndk-r….

  7. Export the folder path to your environment as ANDROID_NDK and add it to PATH. You can achieve this e.g. by adding the following lines to .bashrc export ANDROID_NDK=/home/USERNAME/android-ndk-r… export PATH=$PATH:$ANDROID_NDK.

Credits

The user interface classes are based on the Signal messenger.

License

Licensed GPLv3+, see the LICENSE file for details.

Copyright © 2020 Delta Chat contributors.

Comments
  • MUA replies left behind in INBOX

    MUA replies left behind in INBOX

    Hi

    Thanks for this app. It works well when sending messages meaning that all messages are sent to the chat folder on my server. But the replies to my messages are delivered to Inbox. The friend who replies does not use DC, using regular email client . Is that how it works? If so, seems convoluted.

    I am using it Android 0.17.1 Lollipop Server Exim, Dovecot on Debian Wheezy.

    thanks

    opened by gerroon 91
  • Explain how to trigger a key exchange

    Explain how to trigger a key exchange

    0.16

    Expected behavior When a contact deletes and reinstalls Delta chat, my app still has his old, now invalid key, so it doesn't decrypt his messages, which show as unencryptable messages in regular mail client.

    Deleting the contact would probably lead to a new key exchange. But unfortunately, deleting a contact which is "in use" is disallowed.

    How to trigger a new key exchange?

    Please repair!

    opened by holgerjakobs 69
  • Emails from other MUA are shown in the chat

    Emails from other MUA are shown in the chat

    In my MUA I forwarded a normal email that had nothing to do with a chat to another person having delta chat installed. The email showed up in Delta Chat in a conversation. I would expect Delta to only show chat related emails.

    screenshot_2017-02-14-19-57-21 screenshot_2017-02-14-19-57-57

    How does Delta decide if an email is a chat message or not?

    If you need more details about the email please let me know.

    opened by nexx512 55
  • Battery usage

    Battery usage

    Hello, I see DeltaChat use more battery than other communication application (SMS/MMS, Twitter, ...), more than other IMAP applications (K-9Mail, E-Mail stock). Test configuration : Moto G 2015 CyanogenMod/Android 6.0.1

    opened by reno-a 52
  • Option to disable permanent notification

    Option to disable permanent notification

    I would like an option to disable this permanent notification ("Connected to [email protected]; waiting for messages ...") for the following reasons:

    1. If I am well informed, this will prevent the android system from stopping this app when it runs out of memory. Of course, this may be useful, but personally, I would like it better if all apps were treated equally.
    2. This notification is annoying me.

    Nevertheless, this app is a great idea!

    opened by Hocuri 51
  • Cant transfer Autocrypt key (Enigmail -> Deltachat)

    Cant transfer Autocrypt key (Enigmail -> Deltachat)

    ....sucessfully transfered the key via autocrypt from deltachat 0.10 to enigmail 1.9 weeks before. now i want to transfer the key back to deltachat....

    deltachat 0.16.0 enigmail 2.0

    Steps to reproduce the problem

    1. enigmail 2.0 on Debian Thunderbird
    2. send key via autocrypt (doesnt matter if you set a password to the key or not)
    3. insert setup code
    4. -> invalid setup code

    Debug logs

    If applicable, debug logs can be copied from within the Delta Chat app:

    03-27 12:03:41.852 I/DeltaChat( 4253): *************** ApplicationLoader.onCreate() *************** 03-27 12:03:41.856 I/DeltaChat( 4253): JNI_OnLoad() ... 03-27 12:03:41.856 I/DeltaChat( 4253): JNI_OnLoad() succeeded. 03-27 12:03:41.857 I/DeltaChat( 4253): JNI: s_init_globals()... 03-27 12:03:41.858 I/DeltaChat( 4253): T2: Attaching ok. 03-27 12:03:41.858 I/DeltaChat( 4253): T2: Job thread entered. 03-27 12:03:41.858 I/DeltaChat( 4253): T2: Job thread waiting for signal... 03-27 12:03:41.873 I/DeltaChat( 4253): T1: Opened "/data/user/0/com.b44t.messenger.beta/files/messenger.db" successfully. 03-27 12:03:41.890 I/DeltaChat( 4253): T1: Signal job thread to wake up... 03-27 12:03:41.890 I/DeltaChat( 4253): T2: Job thread checks for pending jobs... 03-27 12:03:41.891 I/DeltaChat( 4253): T2: Executing job #1, action 900... 03-27 12:03:41.894 I/DeltaChat( 4253): T2: Connecting to IMAP-server "imap993" via SSL... 03-27 12:03:41.926 I/DeltaChat( 4253): Display size: 1080 x 1920, DPI: 422.03 x 424.069 03-27 12:03:42.081 I/DeltaChat( 4253): T1: Chatlist created in 3.317 ms. 03-27 12:03:42.087 I/DeltaChat( 4253): *** LaunchActivity.onResume() 03-27 12:03:42.130 I/DeltaChat( 4253): T2: Connection to IMAP-server ok. 03-27 12:03:42.130 I/DeltaChat( 4253): T2: Login to IMAP-server as "odysseus_held_der_antike"... 03-27 12:03:42.134 I/DeltaChat( 4253): *** KeepAliveService.onCreate() 03-27 12:03:42.140 I/DeltaChat( 4253): *** KeepAliveService.onStartCommand() 03-27 12:03:42.199 I/DeltaChat( 4253): T2: IMAP-Login ok. 03-27 12:03:42.199 I/DeltaChat( 4253): T2: IMAP-Capabilities: IMAP4rev1 CHILDREN ENABLE ID IDLE LIST-EXTENDED LIST-STATUS LITERAL+ MOVE NAMESPACE QUOTA SASL-IR SORT SPECIAL-USE THREAD=ORDEREDSUBJECT UIDPLUS UNSELECT WITHIN 03-27 12:03:42.199 I/DeltaChat( 4253): T2: Starting IMAP-watch-thread... 03-27 12:03:42.203 I/DeltaChat( 4253): T3: Attaching ok. 03-27 12:03:42.203 I/DeltaChat( 4253): T3: IMAP-heartbeat-thread started. 03-27 12:03:42.204 I/DeltaChat( 4253): T4: Attaching ok. 03-27 12:03:42.204 I/DeltaChat( 4253): T4: IMAP-watch-thread started. 03-27 12:03:42.204 I/DeltaChat( 4253): T4: Fetching from all folders. 03-27 12:03:42.213 I/DeltaChat( 4253): T2: Job #1 done and deleted from database 03-27 12:03:42.213 I/DeltaChat( 4253): T2: Job thread waiting for signal... 03-27 12:03:42.319 I/DeltaChat( 4253): T4: 0 mails read from "Chats" with 0 errors. 03-27 12:03:42.393 I/DeltaChat( 4253): T4: 0 mails read from "Drafts" with 0 errors. 03-27 12:03:42.393 I/DeltaChat( 4253): T4: Folder "Entwürfe" ignored. 03-27 12:03:42.463 I/DeltaChat( 4253): T4: 0 mails read from "Gesendet" with 0 errors. 03-27 12:03:42.619 I/DeltaChat( 4253): T4: Receiving message INBOX/1161029470... 03-27 12:03:42.711 I/DeltaChat( 4253): T4: Message sent by another messenger (will be moved to Chats-folder). 03-27 12:03:42.712 I/DeltaChat( 4253): T4: Message has 1 parts and is moved to chat #12. 03-27 12:03:42.727 I/DeltaChat( 4253): T1: Chatlist created in 0.187 ms. 03-27 12:03:42.728 I/DeltaChat( 4253): T1: Chatlist created in 0.131 ms. 03-27 12:03:42.728 I/DeltaChat( 4253): T1: Message list for search "(null)" in chat #0 created in 0.021 ms. 03-27 12:03:42.775 I/DeltaChat( 4253): T4: Receiving message INBOX/1161029471... 03-27 12:03:42.829 I/DeltaChat( 4253): T4: Message sent by another messenger (will be moved to Chats-folder). 03-27 12:03:42.830 I/DeltaChat( 4253): T4: Message has 1 parts and is moved to chat #13. 03-27 12:03:42.943 I/DeltaChat( 4253): T1: Chatlist created in 1.394 ms. 03-27 12:03:42.944 I/DeltaChat( 4253): T1: Chatlist created in 0.087 ms. 03-27 12:03:42.944 I/DeltaChat( 4253): T1: Message list for search "(null)" in chat #0 created in 0.015 ms. 03-27 12:03:42.987 I/DeltaChat( 4253): T4: Receiving message INBOX/1161029472... 03-27 12:03:43.003 I/DeltaChat( 4253): T4: Message sent by another messenger (will be moved to Chats-folder). 03-27 12:03:43.004 I/DeltaChat( 4253): T4: Message has 1 parts and is moved to chat #13. 03-27 12:03:43.014 I/DeltaChat( 4253): T1: Chatlist created in 0.185 ms. 03-27 12:03:43.015 I/DeltaChat( 4253): T1: Chatlist created in 0.098 ms. 03-27 12:03:43.015 I/DeltaChat( 4253): T1: Message list for search "(null)" in chat #0 created in 0.015 ms. 03-27 12:03:43.054 I/DeltaChat( 4253): T4: Receiving message INBOX/1161029473... 03-27 12:03:43.071 I/DeltaChat( 4253): T4: Message has 1 parts and is moved to chat #10. 03-27 12:03:43.094 I/DeltaChat( 4253): T4: 4 mails read from "INBOX" with 0 errors. 03-27 12:03:43.094 I/DeltaChat( 4253): T1: Chatlist created in 2.094 ms. 03-27 12:03:43.096 I/DeltaChat( 4253): T1: Chatlist created in 0.257 ms. 03-27 12:03:43.096 I/DeltaChat( 4253): T1: Message list for search "(null)" in chat #0 created in 0.037 ms. 03-27 12:03:43.161 I/DeltaChat( 4253): T4: 0 mails read from "Papierkorb" with 0 errors. 03-27 12:03:43.200 I/DeltaChat( 4253): T4: Init lastseenuid and attach it to UIDVALIDITY for folder "Postausgang". 03-27 12:03:43.200 I/DeltaChat( 4253): T4: Folder "Postausgang" is empty. 03-27 12:03:43.200 I/DeltaChat( 4253): T4: 0 mails read from "Postausgang" with 0 errors. 03-27 12:03:43.339 I/DeltaChat( 4253): T4: Receiving message Sent/1161027749... 03-27 12:03:43.429 I/DeltaChat( 4253): T4: Message is a reply to a messenger message (will be moved to Chats-folder). 03-27 12:03:43.429 I/DeltaChat( 4253): T4: Message has 1 parts and is moved to chat #13. 03-27 12:03:43.445 I/DeltaChat( 4253): T1: Chatlist created in 0.204 ms. 03-27 12:03:43.446 I/DeltaChat( 4253): T1: Chatlist created in 0.174 ms. 03-27 12:03:43.447 I/DeltaChat( 4253): T1: Message list for search "(null)" in chat #0 created in 0.021 ms. 03-27 12:03:43.484 I/DeltaChat( 4253): T4: Receiving message Sent/1161027750... 03-27 12:03:43.502 I/DeltaChat( 4253): T4: Message has 1 parts and is moved to chat #10. 03-27 12:03:43.525 I/DeltaChat( 4253): T4: 2 mails read from "Sent" with 0 errors. 03-27 12:03:43.525 I/DeltaChat( 4253): T4: Folder "Trash" ignored. 03-27 12:03:43.526 I/DeltaChat( 4253): T1: Chatlist created in 1.078 ms. 03-27 12:03:43.527 I/DeltaChat( 4253): T1: Chatlist created in 0.151 ms. 03-27 12:03:43.528 I/DeltaChat( 4253): T1: Message list for search "(null)" in chat #0 created in 0.021 ms. 03-27 12:03:43.647 I/DeltaChat( 4253): T4: Receiving message Unbekannt/1161027864... 03-27 12:03:43.655 I/DeltaChat( 4253): T4: Message has 1 parts and is moved to chat #14. 03-27 12:03:43.685 I/DeltaChat( 4253): T4: 1 mails read from "Unbekannt" with 0 errors. 03-27 12:03:43.685 I/DeltaChat( 4253): T4: Folder "Unerwünscht" ignored. 03-27 12:03:43.685 I/DeltaChat( 4253): T1: Chatlist created in 1.231 ms. 03-27 12:03:43.686 I/DeltaChat( 4253): T1: Chatlist created in 0.183 ms. 03-27 12:03:43.687 I/DeltaChat( 4253): T1: Message list for search "(null)" in chat #0 created in 0.020 ms. 03-27 12:03:43.746 I/DeltaChat( 4253): T4: IDLE start... 03-27 12:03:47.248 I/DeltaChat( 4253): T1: Message list for chat #10 created in 0.503 ms. 03-27 12:04:41.876 I/DeltaChat( 4253): *** TimerReceiver.onReceive() 03-27 12:04:46.102 W/DeltaChat( 4253): T1: Cannot decrypt Autocrypt Setup Message. 03-27 12:05:53.108 I/DeltaChat( 4253): *** LaunchActivity.onPause() 03-27 12:05:53.588 I/DeltaChat( 4253): *** Screen on 03-27 12:05:53.633 I/DeltaChat( 4253): *** Screen off 03-27 12:06:20.042 I/DeltaChat( 4253): *** TimerReceiver.onReceive() 03-27 12:07:21.580 I/DeltaChat( 4253): *** TimerReceiver.onReceive() 03-27 12:08:21.597 I/DeltaChat( 4253): *** TimerReceiver.onReceive() 03-27 12:09:23.588 I/DeltaChat( 4253): *** TimerReceiver.onReceive() 03-27 12:10:25.587 I/DeltaChat( 4253): *** TimerReceiver.onReceive() 03-27 12:11:26.590 I/DeltaChat( 4253): *** TimerReceiver.onReceive() 03-27 12:12:27.586 I/DeltaChat( 4253): *** TimerReceiver.onReceive() 03-27 12:12:37.884 I/DeltaChat( 4253): *** Screen on 03-27 12:12:41.644 I/DeltaChat( 4253): *** LaunchActivity.onResume() 03-27 12:13:01.497 I/DeltaChat( 4253): T4: IDLE has data. 03-27 12:13:01.497 I/DeltaChat( 4253): T4: IMAP stream lost; we'll reconnect soon. 03-27 12:13:01.508 I/DeltaChat( 4253): T4: Disconnecting... 03-27 12:13:01.510 I/DeltaChat( 4253): T4: Disconnect done. 03-27 12:13:01.514 I/DeltaChat( 4253): T4: Connecting to IMAP-server "imap.:993" via SSL... 03-27 12:13:01.947 I/DeltaChat( 4253): T4: Connection to IMAP-server ok. 03-27 12:13:01.948 I/DeltaChat( 4253): T4: Login to IMAP-server as "o"... 03-27 12:13:02.041 I/DeltaChat( 4253): T4: IMAP-Login ok. 03-27 12:13:02.137 I/DeltaChat( 4253): T4: IDLE start... 03-27 12:13:45.801 I/DeltaChat( 4253): *** TimerReceiver.onReceive() 03-27 12:13:50.891 I/DeltaChat( 4253): *** LaunchActivity.onPause() 03-27 12:13:51.309 I/DeltaChat( 4253): *** Screen off 03-27 12:14:45.840 I/DeltaChat( 4253): *** TimerReceiver.onReceive() 03-27 12:15:11.033 I/DeltaChat( 4253): *** Screen on 03-27 12:15:14.406 I/DeltaChat( 4253): *** LaunchActivity.onResume() 03-27 12:15:21.125 I/DeltaChat( 4253): *** LaunchActivity.onPause() 03-27 12:16:10.595 I/DeltaChat( 4253): *** TimerReceiver.onReceive() 03-27 12:16:37.309 I/DeltaChat( 4253): *** Screen off 03-27 12:17:11.602 I/DeltaChat( 4253): *** TimerReceiver.onReceive() 03-27 12:18:09.678 I/DeltaChat( 4253): *** Screen on 03-27 12:18:23.483 I/DeltaChat( 4253): *** TimerReceiver.onReceive() 03-27 12:18:23.556 I/DeltaChat( 4253): *** Screen off 03-27 12:18:52.243 I/DeltaChat( 4253): *** Screen on 03-27 12:19:23.508 I/DeltaChat( 4253): *** TimerReceiver.onReceive() 03-27 12:20:23.516 I/DeltaChat( 4253): *** TimerReceiver.onReceive() <

    bug core 
    opened by g6094199 45
  • there should be a device message in case of SMTP authentication failure

    there should be a device message in case of SMTP authentication failure

    • Android version: 9
    • Device: xiaomi
    • Delta Chat version: 1.0.3
    • Expected behavior:
    • Actual behavior:
    • Steps to reproduce the problem:

    I was able to check the email, send and receive without any problem, through the web client (Chrome Browser)

    . Reset the application, this time did not solve the problem. . Reset the connection, solved the problem.

    In case it may interest: The type of connection used, only allows you to check email, that is, there is no internet access.

    I hope this information is helpful to continue improving this magnificent application.