I am using Firebase realtime database in Android app, and have data like this:
I want to delete the "point": tab of all users at the weekend. Auto delete every weekend. how can I do that.
I am using Firebase realtime database in Android app, and have data like this:
I want to delete the "point": tab of all users at the weekend. Auto delete every weekend. how can I do that.
I suggest you to write a script that loop through the users and for each user remove the "point" entry, firebase provide a basic function to do it
userRef.child("point").remove();
You can write it in the language you prefer (I had a similar problem and i wrote it in python using a library).
Once the script is done, you just have to schedule it somewhere.
If you have your own server you can use crontab
(in linux) and schedule it to run every weekend. For example this run your script every Sunday at 5pm.
0 17 * * sun /scripts/deleteFirebasePoints.sh
If you don't have your own server you can use some services like AWS or Google Cloud. It's also possible to use Firebase Cloud Functions to do it, it allows you to create your own function easily, but last time I used it it was a bit complicated to schedule it.