1

In Fragment and in Dialogs I have put some code relative to CRUD operation on my Firestore database. These operations are, e.g., addSnapshotListener , get, update , WriteBatches , ...

The problem is that the user can rotates the screen, leading to a re-execution of those CRUD operations, which are not free - I have the Firebase SPARK Plan so it's actually free but if the limit is reached, no further CRUD operation will be done until the month ends or something like that.

So my question is: should I put these CRUD operations in another callback than onActivityCreated (if yes: how could I put the UI code that I've written in the CRUD operations' onComplete callback, which must be put in onActivityCreated?)? Or: is there another solution, for example a cache system?

JarsOfJam-Scheduler
  • 2,809
  • 3
  • 31
  • 70

0 Answers0