Hello! We have created a taxi app in flutter. So far everything is working fine, except for one. How to automatically update a document without flutter on the server side? For example, a taxi driver, when entering the application, presses the online button and can pick up the order. But there is a case where he exits the application without pressing offline. In this case, we should automatically change its status to inactive (offline). Do I need to write a function for this and deploy it to the server?
I always suggest creating a sort of heartbeat by having the app update a last ping timestamp every minute or so. If the app stops updating that timestamp after Y minutes, they can be considered offline
Okay, that's understandable. But how then to update the document on the server to change the driver status to offline automatic?
probably with a cloud function
Thank you! Is it possible to do this through Dart?
Yes! Dart 2.15, 2.16 and 2.17 are supported runtimes as of now.
Please take a look here for all the supported runtime environments https://appwrite.io/docs/functions#supportedRuntimes
Recommended threads
- Appwrite project paused
I have github student account. The auth has been paused however the database is working fine. I cant see any option to resume from my console panel. It is just ...
- MongoDb Database Breaks integer[] & bigi...
I've got a table with the below column created. When I try to insert the value `[-3408048000]` into it, the dart sdk cloud function call is successful (no error...
- Appwrite Functions cold start
Hello. I'm seeing really long cold starts on Appwrite Cloud Functions and wanted to know if this is expected. My function just authenticates the user, fetches ...