## Type of change - [x] Feature - [ ] Bugfix - [ ] Technical - [ ] Other : ## Content This PR consists of several macro-blocks separated by path/package: - `messages.impl.mediaplayer` : Global (room-wide) media player, now used only for voice messages but could be used for all media within EX in the future. It is backed by media3's exoplayer. Currently not unit-tested because mocking exoplayer is not trivial. - `messages.impl.voicemessages.play` : Business logic of a timeline voice message. This is all the logic that manages the voice message bubble. - `messages.impl.timeline.model` & `messages.impl.timeline.factories`: Timeline code that takes care of creating the `content` object for voice messages. - `messages.impl.timeline.components` : The actual View composable that shows the UI inside a voice message bubble. All the rest is just small related changes that must be done here and there in existing code. From a high level perspective this is how it works: - Voice messages are unlike other message bubbles because they carry state (i.e. playing, downloading...) so they have a Presenter managing this state. - Media content (i.e. the ogg file) of a voice message is downloaded from the rust SDK on first play then stored in a voice messages cache (see the `VoiceMessageCache` class, it is just a subdirectory in the app's cacheDir which is indexed by the matrix content uri). All further play attempts are done from the cache without hitting the rust SDK anymore. - Playback of the ogg file is handled with the `VoiceMessagePlayer` class which is basically a "view" of the global `MediaPlayer` that allow the voice message to only see the media player state belonging to its media content. - Drawing of the waveform is done with an OSS library wrapped in the `WaveformProgressIndicator` composable. Known issues: - The waveform has no position slider. - The waveform (and together with it the whole message bubble) is taller than the actual Figma design. - Swipe to reply for voice messages is disabled to avoid conflict with the audio scrubbing gesture (to reply to a voice message you have to use the long press menu). - The loading indicator is always shown (there is no delay). - Voice messages don't stop playing when redacted. ## Motivation and context https://github.com/vector-im/element-meta/issues/2083 ## Screenshots / GIFs Provided by Screenshot tests in the PR itself. |
||
|---|---|---|
| .github | ||
| .idea | ||
| .maestro | ||
| anvilannotations | ||
| anvilcodegen | ||
| app | ||
| appconfig | ||
| appnav | ||
| changelog.d | ||
| docs | ||
| fastlane/metadata/android/en-US | ||
| features | ||
| gradle | ||
| libraries | ||
| plugins | ||
| samples/minimal | ||
| services | ||
| tests | ||
| tools | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| AUTHORS.md | ||
| build.gradle.kts | ||
| CHANGES.md | ||
| CODEOWNERS | ||
| CONTRIBUTING.md | ||
| Gemfile | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| LICENSE | ||
| README.md | ||
| settings.gradle.kts | ||
| towncrier.toml | ||
Element X Android
Element X Android is a Matrix Android Client provided by element.io. This app is currently in a pre-alpha release stage with only basic functionalities.
The application is a total rewrite of Element-Android using the Matrix Rust SDK underneath and targeting devices running Android 6+. The UI layer is written using Jetpack Compose, and the navigation is managed using Appyx.
Learn more about why we are building Element X in our blog post: https://element.io/blog/element-x-experience-the-future-of-element/.
Table of contents
Screenshots
Here are some early screenshots of the application:
![]() |
![]() |
![]() |
![]() |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
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 in work in progress. The app does not cover yet all functionalities we expect. The list of supported features can be found in this issue.
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.
Makes sure to select the app configuration when building (as we also have sample apps in the project).
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 & License
Copyright © New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.







