- Kotlin 100%
| .idea | ||
| app | ||
| gradle | ||
| .gitignore | ||
| build.gradle.kts | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| README.md | ||
| settings.gradle.kts | ||
Matrix Client
This Android app uses Jetpack Compose for its UI. The app module includes the
headless Trixnity Messenger SDK (4.10.3) from Maven Central. It provides
Matrix messenger state and view models; the Compose screens are ours to build.
The app also includes Ktor's OkHttp engine so the SDK can contact homeservers.
Getting started
- Open the project in Android Studio and sync Gradle.
- Run the
appconfiguration.MainActivitycreates aMatrixMessengerfrom a lifecycle coroutine, then callscreateRoot()once and passes the root to Compose. The SDK chooses the active route throughRootViewModel.stack. AddMatrixAccountScreenshows homeserver discovery and the login methods offered by that server. SSO and OAuth device authorization have basic screens.PasswordLoginis still a placeholder. The basicMainScreenlets you open account management and log out; room content is still a placeholder. Each route wrapper gives its screen the corresponding view model.
The SDK defines each screen's possible states in its view model interface. For
example, look at OAuth2DeviceAuthorizationLoginViewModel.State and
SSOLoginViewModel in the SDK source. The Android Activity provides the browser
opener and receives the app's com.maiotech.matrixclient: login callbacks.
This Activity-scoped setup is a simple starting point. Before supporting multiple
profiles, switch to MatrixMultiMessenger, as recommended by the SDK. The SDK
currently cannot migrate a plain MatrixMessenger to MatrixMultiMessenger.
The Trixnity Messenger README documents routing, configuration, and view models. Its Compose View README shows a complete UI, but the Compose View dependency is optional and is not included here because this project is for a custom UI.
Trixnity Messenger is licensed under AGPL-3.0. The maintainers also offer a commercial license; check the license choice before distributing the app.