Skip to content

ArbazMateen/User-Online-Demo-Firestore

 
 

Repository files navigation

User-Online-Demo-Firestore

This is a demo project to managing users' presence like users' online and offline status using Firestore, Firebase Realtime Database and Cloud Functions.

You can read about how it works at Medium on: https://android.jlelse.eu/fmanaging-user-presence-with-firestore-in-android-a1146bdf101d

Firestore stores all the users in Users collections with each document as different user. These documents contain name, status (online/offline), last active (timestamp), and about line.

Firebase Realtime Database stores each user's online or offline status. The purpose of this is to trigger cloud function in case of network failure or app exit through onDisconnect() method.

Following is the demo run on two devices. Left device is using Zeeshan as logged user, and right device is using Wajahat as logged user. When Zeeshan exits the app, right device can see his status change from Online to Few Seconds Ago and vice versa for Wajahat as well.

About

Managing users' presence like users' online and offline status using Firestore and Cloud Functions. Read more at: https://android.jlelse.eu/fmanaging-user-presence-with-firestore-in-android-a1146bdf101d

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 89.0%
  • JavaScript 11.0%