Convert Figma logo to code with AI

element-hq logoelement-android

A Matrix collaboration client for Android.

3,312
699
3,312
2,121

Top Related Projects

A Matrix collaboration client for Android.

Matrix Client-Server SDK for JavaScript

Matrix SDK for React Javascript

2,205

Modern XMPP ("Jabber") Chat Client using GTK+/Vala

A private messenger for Android.

Quick Overview

Element Android is an open-source Matrix client for Android devices. It provides a user-friendly interface for accessing the Matrix decentralized communication network, offering features like end-to-end encryption, group chats, and file sharing.

Pros

  • End-to-end encryption for secure communication
  • Support for group chats and communities
  • Integration with the Matrix ecosystem
  • Regular updates and active development

Cons

  • May be complex for users unfamiliar with Matrix
  • Some features may be less intuitive compared to mainstream messaging apps
  • Occasional stability issues reported by users
  • Limited support for some advanced Matrix features

Getting Started

To get started with Element Android:

  1. Download the app from the Google Play Store or F-Droid.
  2. Open the app and create a new account or log in with an existing Matrix account.
  3. Join rooms or start new conversations by tapping the "+" button.
  4. Explore settings to customize your experience and security options.

For developers interested in contributing:

  1. Clone the repository:
    git clone https://github.com/element-hq/element-android.git
    
  2. Open the project in Android Studio.
  3. Build and run the app on an emulator or physical device.
  4. Refer to the CONTRIBUTING.md file for guidelines on submitting pull requests.

Competitor Comparisons

A Matrix collaboration client for Android.

Pros of element-android

  • No distinct advantages identified as both repositories refer to the same project
  • Identical codebase and features

Cons of element-android

  • No specific disadvantages as both repositories are the same
  • Identical issues and limitations

Code Comparison

As both repositories are identical, there is no code difference to compare. Here's a sample of code that would be the same in both:

class VectorApplication : Application(), HasAndroidInjector {
    @Inject lateinit var androidInjector: DispatchingAndroidInjector<Any>

    override fun onCreate() {
        super.onCreate()
        DaggerVectorComponent.factory().create(this).inject(this)
    }

    override fun androidInjector() = androidInjector
}

Additional Notes

  • element-android and element-android are the same repository
  • Both repositories contain the Android client for the Element messaging app
  • They share identical features, issues, and development progress
  • Contributors and users can interact with either repository interchangeably
  • The project is part of the Element ecosystem, which supports secure, decentralized communication using the Matrix protocol

Matrix Client-Server SDK for JavaScript

Pros of matrix-js-sdk

  • Cross-platform compatibility, allowing development for web and Node.js environments
  • Easier integration with existing JavaScript/TypeScript projects
  • Lightweight and flexible, suitable for various application types

Cons of matrix-js-sdk

  • Limited to JavaScript/TypeScript ecosystems
  • May require additional libraries for full-featured client applications
  • Potentially slower performance compared to native Android implementations

Code Comparison

matrix-js-sdk:

const client = sdk.createClient({
  baseUrl: "https://matrix.org",
  accessToken: "YOUR_ACCESS_TOKEN",
  userId: "@alice:matrix.org"
});

client.on("Room.timeline", function(event, room, toStartOfTimeline) {
  console.log(event.getContent().body);
});

element-android:

val session = Matrix.getInstance(context).getSession(sessionId)
session.roomService().getRoom(roomId)?.let { room ->
    room.timeline().addListener(object : Timeline.Listener {
        override fun onNewTimelineEvents(eventIds: List<String>) {
            // Handle new events
        }
    })
}

The matrix-js-sdk example demonstrates event handling in JavaScript, while the element-android snippet shows similar functionality in Kotlin for Android. The JavaScript code is more concise, but the Android version offers tighter integration with the platform's ecosystem.

Matrix SDK for React Javascript

Pros of matrix-react-sdk

  • Cross-platform compatibility for web and desktop applications
  • Rich set of React components for building Matrix clients
  • Extensive documentation and community support

Cons of matrix-react-sdk

  • Limited to web and desktop platforms, not suitable for native mobile apps
  • Steeper learning curve for developers not familiar with React
  • Potentially larger bundle size compared to native Android development

Code Comparison

matrix-react-sdk (JavaScript/React):

import React from 'react';
import { MatrixClientPeg } from 'matrix-js-sdk';

const RoomList = () => {
    const rooms = MatrixClientPeg.get().getRooms();
    return (
        <ul>
            {rooms.map(room => <li key={room.roomId}>{room.name}</li>)}
        </ul>
    );
};

element-android (Kotlin):

import org.matrix.android.sdk.api.session.room.Room

class RoomListFragment : Fragment() {
    private val session = Matrix.getInstance(requireContext()).session
    
    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        val rooms: List<Room> = session?.roomService()?.getRooms() ?: emptyList()
        // Inflate and populate view with rooms
    }
}

The code snippets demonstrate the different approaches to fetching and displaying room lists in each project, highlighting the language and framework differences between the two repositories.

2,205

Modern XMPP ("Jabber") Chat Client using GTK+/Vala

Pros of Dino

  • Written in Vala, which may offer better performance and lower resource usage
  • Focuses on XMPP protocol, providing a specialized solution for this communication standard
  • Simpler codebase, potentially easier to maintain and contribute to

Cons of Dino

  • Limited to XMPP, while Element-Android supports Matrix protocol
  • Smaller community and fewer contributors compared to Element-Android
  • Less feature-rich, lacking some advanced functionalities present in Element-Android

Code Comparison

Dino (Vala):

public class ConversationItemSkeleton : Gtk.ListBoxRow {
    public ConversationItemSkeleton() {
        Object(activatable: false, selectable: false);
        this.add_css_class("conversation-item");
        this.add_css_class("skeleton");
    }
}

Element-Android (Kotlin):

class ConversationViewHolder(
    private val views: ConversationListItemBinding
) : AbsMessageItemViewHolder<ConversationListItem>(views.root) {
    override fun bind(item: ConversationListItem) {
        views.conversationNameView.text = item.name
    }
}

The code snippets show different approaches to creating conversation item views. Dino uses Vala with GTK, while Element-Android uses Kotlin with Android's view binding. Element-Android's code appears more concise and tailored for mobile development, while Dino's code reflects its desktop-oriented nature.

A private messenger for Android.

Pros of Signal-Android

  • More established project with a larger user base and community
  • Stronger focus on privacy and security features
  • Better documentation and onboarding for new contributors

Cons of Signal-Android

  • Less flexible in terms of server choice (tied to Signal's infrastructure)
  • More limited in terms of customization options for end-users
  • Slower release cycle compared to Element-Android

Code Comparison

Signal-Android (Kotlin):

private fun handleMessageSend(message: OutgoingMessage) {
    val recipient = message.recipient
    val threadId = DatabaseFactory.getThreadDatabase(context).getThreadIdFor(recipient)
    MessageSender.send(context, message, threadId)
}

Element-Android (Kotlin):

private fun sendMessage(roomId: String, content: MessageContent) {
    viewModelScope.launch {
        try {
            session.roomService().sendMessage(roomId, content)
        } catch (failure: Throwable) {
            _viewEvents.post(ViewEvents.ShowError(failure))
        }
    }
}

Both projects use Kotlin and follow similar patterns for message sending, but Element-Android's code appears more concise and leverages coroutines for asynchronous operations.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Latest build Weblate Element Android Matrix room #element-android:matrix.org Quality Gate Status Vulnerabilities Bugs

Element Android

Element Android is an Android Matrix Client provided by Element. The app can be run on every Android devices with Android OS Lollipop and more (API 21).

It is a total rewrite of Riot-Android with a new user experience.

Get it on Google Play Get it on F-Droid

Build of develop branch: GitHub Action Nightly test status: allScreensTest

New Android SDK

Element is based on a new Android SDK fully written in Kotlin (like Element). In order to make the early development as fast as possible, Element and the new SDK currently share the same git repository.

At each Element release, the SDK module is copied to a dedicated repository: https://github.com/matrix-org/matrix-android-sdk2. That way, third party apps can add a regular gradle dependency to use it. So more details on how to do that here: https://github.com/matrix-org/matrix-android-sdk2.

Roadmap

The version 1.0.0 of Element still misses some features which was previously included in Riot-Android. The team will work to add them on a regular basis.

Releases to app stores

There is some delay between when a release is created and when it appears in the app stores (Google Play Store and F-Droid). Here are some of the reasons:

  • Not all versioned releases that appear on GitHub are considered stable. Each release is first considered beta: this continues for at least two days. If the release is stable (no serious issues or crashes are reported), then it is released as a production release in Google Play Store, and a request is sent to F-Droid too.
  • Each release on the Google Play Store undergoes review by Google before it comes out. This can take an unpredictable amount of time. In some cases it has taken several weeks.
  • In order for F-Droid to guarantee that the app you receive exactly matches the public source code, they build releases themselves. When a release is considered stable, Element staff inform the F-Droid maintainers and it is added to the build queue. Depending on the load on F-Droid's infrastructure, it can take some time for releases to be built. This always takes at least 24 hours, and can take several days.

If you would like to receive releases more quickly (bearing in mind that they may not be stable) you have a number of options:

  1. Sign up to receive beta releases via the Google Play Store.
  2. Install a release APK directly - download the relevant .apk file and allow installing from untrusted sources in your device settings. Note: these releases are the Google Play version, which depend on some Google services. If you prefer to avoid that, try the latest dev builds, and choose the F-Droid version.
  3. If you're really brave, install the very latest dev build - pick a build, then click on Summary to download the APKs from there: vector-Fdroid-debug and vector-Gplay-debug contains the APK for the desired store. Each file contains 5 APKs. 4 APKs for every supported specific architecture of device. In doubt you can install the universal APK.

Contributing

Please refer to CONTRIBUTING.md if you want to contribute on Matrix Android projects!

Come chat with the community in the dedicated Matrix room.

Also this documentation can hopefully help developers to start working on the project.

Triaging issues

Issues are triaged by community members and the Android App Team, following the triage process.

We use issue labels to sort all incoming issues.