/HandlersDemo

This project is a proof of concept that demonstrates a chat communication system between a sender and a receiver using Android's Messenger, Handlers, and Loopers. Both the sender and receiver utilize these concepts in different ways to achieve reactive communication.

Primary LanguageJava

HandlersDemo

This project is a proof of concept that demonstrates a chat communication system between a sender and a receiver using Android's Messenger, Handlers, and Loopers. Both the sender and receiver utilize these concepts in different ways to achieve reactive communication.

Table of Contents

Features

  • Two-way chat communication between a sender and a receiver.
  • Sender thread extended from HandlerThread, implementing MessageQueue.IdleHandler.
  • Receiver using a Java thread, implementing Runnable and MessageQueue.IdleHandler.
  • Use of Messengers for sending and receiving messages.
  • Reactive communication where the sender sends a message, and the receiver responds.
  • Handling delays and waiting for the receiver to respond.

Demonstration

Screen_recording_20231026_205800.mp4

🤝🏻 Contribute

Any PRs are very welcome! 😍 You can fix a bug, add a feature, optimize performance and even propose a new cool approach in code-base architecture. Feel free and make a PR! 😌

License

  • This project is licensed under the MIT License.