Benoit Marty 73a6ba2849 Multi accounts - experimental first implementation (#5285)
* Multi account - Do not reset analytics store on sign out.

Else when 1 of many accounts is removed, the analytics opt in screen is displayed again.

* Multi accounts - first implementation.

* Multi accounts - Prevent user from logging twice with the same account

* Multi accounts - ignore automatic GoBack in case of error.

* Multi accounts - update first view when adding an account.

* Rename method storeData to addSession.

* Multi accounts - handle account switch when coming from a notification

* Multi accounts - handle login link when there is already an account.

* Multi accounts - handle click on push history for not current account.

* Multi accounts - improve layout and add preview.

* Add accountselect modules

* Multi accounts - incoming share with account selection

* Multi accounts - check the feature flag before allowing login using login link.

* Multi accounts - swipe on account icon

* Cleanup

* Multi accounts - fix other implementation of SessionStore

* Multi accounts - fix PreferencesRootPresenterTest

* Multi accounts - Add test on AccountSelectPresenter

* Multi accounts - Fix test on HomePresenter - WIP

* Update database to be able to sort accounts by creation date.

* Add unit test on takeCurrentUserWithNeighbors

* Fix test and improve code.

* Add exception

* Multi accounts - handle permalink

* Code quality

* Multi accounts - localization

* Fix issue after rebase on develop

* Fix issue after rebase on develop

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Update Multi accounts flag details.

* Add missing test on DatabaseSessionStore

* Add missing preview on LoginModeView

* Remove dead code.

* Add missing preview on PushHistoryView

* Document API.

* Rename API and update test.

* Remove MatrixAuthenticationService.loggedInStateFlow()

* Update screenshots

* Remove unused import

* Add exception

* Fix compilation issue after rebase on develop.

* Update screenshots

* Fix test

* Avoid calling getLatestSession() twice

* Rename `matrixUserAndNeighbors` to `currentUserAndNeighbors`

* Extract code to its own class.

* Add comment to clarify the code.

* Init current user profile with what we now have in the database.

It allows having the cached data (user display name and avatar) when starting the application when no network is available.

* Let the RustMatrixClient update the profile in the session database

* Fix test.

* When logging out from Pin code screen, logout from all the sessions.

tom

* Make PushData.clientSecret mandatory.
Also do not restore the last session as a fallback, it can lead to error in a multi account context, or even when a ghost pusher send a Push.

* Change test in RustMatrixAuthenticationServiceTest

* Do not use MatrixAuthenticationService in RootFlowNode, only use SessionStore

* Remove MatrixAuthenticationService.getLatestSessionId()

* Fix compilation issue after merging develop

* Add test on DefaultAccountSelectEntryPoint

* Fix compilation issue after merging develop

* Introduce LoggedInAccountSwitcherNode, to improve animation when switching between accounts.

* Rename Node to follow naming convention.

* Fix navigation issue after login.

* Remove unused import

* Revert "Fix navigation issue after login."

This reverts commit e409630856d7a7e741548016d7afe174ff1b40f7.

* Revert "Rename Node to follow naming convention."

This reverts commit 883b1f37c7207512d9f6605749977ad9045846a1.

* Revert "Introduce LoggedInAccountSwitcherNode, to improve animation when switching between accounts."

This reverts commit 9c698ff8152aceb5fd2b8b5ab5f609d28de64d24.

* Metro now have `@AssistedInject`.

* Update screenshots

* Introduce DelegateTransitionHandler and use it in RootFlowNode

---------

Co-authored-by: ElementBot <android@element.io>
Co-authored-by: ganfra <francoisg@element.io>
2025-09-26 15:45:06 +02:00
2025-09-26 08:34:20 +02:00
2025-08-12 16:08:43 +02:00
2025-04-07 11:48:40 +02:00
2025-09-26 08:16:36 +00:00
2025-09-05 16:54:45 +02:00
2025-09-26 08:16:36 +00:00
2025-09-16 15:54:10 +02:00
2025-09-24 15:05:06 +02:00
2025-01-07 09:59:50 +01:00
2025-07-11 12:24:53 +02:00

Latest build Quality Gate Status Vulnerabilities Bugs codecov Element X Android Matrix room #element-x-android:matrix.org Localazy

Element X Android

Element X Android is the next-generation Matrix client provided by Element.

Compared to the previous-generation Element Classic, the application is a total rewrite, using the Matrix Rust SDK underneath and targeting devices running Android 7+. The UI layer is written using Jetpack Compose, and the navigation is managed using Appyx.

Get it on Google PlayGet it on F-Droid

Table of contents

Screenshots

Here are some screenshots of the application:

Translations

Element X Android supports many languages. You can help us to translate the app in your language by joining our Localazy project. You can also help us to improve the existing translations.

Note that for now, we keep control on the French and German translations.

Translations can be checked screen per screen using our tool Element X Android Gallery, available at https://element-hq.github.io/element-x-android/. Note that this page is updated every Tuesday.

More instructions about translating the application can be found at CONTRIBUTING.md.

Rust SDK

Element X leverages the Matrix Rust SDK through an FFI layer that the final client can directly import and use.

We're doing this as a way to share code between platforms and while we've seen promising results it's still in the experimental stage and bound to change.

Status

This project is actively developed and supported. New users are recommended to use Element X instead of the previous-generation app.

Minimum SDK version

Element X Android requires a minimum SDK version of 24 (Android 7.0, Nougat). We aim to support devices running Android 7.0 and above, which covers a wide range of devices still in use today.

Element Android Enterprise requires a minimum SDK version of 33 (Android 13, Tiramisu). For Element Enterprise, we support only devices that still receive security updates, which means devices running Android 13 and above. Android does not have a documented support policy, but some information can be found at https://endoflife.date/android.

Contributing

Want to get actively involved in the project? You're more than welcome! A good way to start is to check the issues that are labelled with the good first issue label. Let us know by commenting the issue that you're starting working on it.

But first make sure to read our contribution guide first.

You can also come chat with the community in the Matrix room dedicated to the project.

Build instructions

Just clone the project and open it in Android Studio. Make sure to select the app configuration when building (as we also have sample apps in the project).

To build against a local copy of the Rust SDK, see the Developer onboarding instructions.

Support

When you are experiencing an issue on Element X Android, please first search in GitHub issues and then in #element-x-android:matrix.org. If after your research you still have a question, ask at #element-x-android:matrix.org. Otherwise feel free to create a GitHub issue if you encounter a bug or a crash, by explaining clearly in detail what happened. You can also perform bug reporting from the application settings. This is especially recommended when you encounter a crash.

Copyright (c) 2022 - 2025 New Vector Ltd

This software is dual licensed by New Vector Ltd (Element). It can be used either:

(1) for free under the terms of the GNU Affero General Public License (as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version); OR

(2) under the terms of a paid-for Element Commercial License agreement between you and Element (the terms of which may vary depending on what you and Element have agreed to).

Unless required by applicable law or agreed to in writing, software distributed under the Licenses is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licenses for the specific language governing permissions and limitations under the Licenses.

Description
No description provided
Readme AGPL-3.0 2 GiB
Languages
Kotlin 98.8%
Python 0.5%
Shell 0.4%
JavaScript 0.2%