devonzuegel / ketchup-club

1 stars 1 forks source link

App should set status to offline any time the user is on a call #6

Open elidourado opened 8 months ago

elidourado commented 8 months ago

Imagine a scenario where a user sets their status to online, then somebody responds and calls them. Yay! The app works. But what if multiple people try to call? It could be call waiting hell.

To address this, the app should automatically set status to offline if the user is on the phone. We can do this on iOS with the CXCallObserver class. Presumably there is something similar on Android.

When the user hangs up, if there is sufficient time left in their original online session, the app should put their status back to online.

elidourado commented 8 months ago

The equivalent functionality on Android would be through TelephonyManager and PhoneStateListener apparently.