Ad

How To Stop Refreshing/re-creating Activity When Updating Firebase Data Using SetValue?

When, using a button, I try to update a data in Firebase realtime database using setValue() method, it recreates the activity whenever I click the button. Does 'setValue()' of Firebase automatically recreate the activity? If so, how to prevent that?

Ad

Answer

Firebase SDKs in no way deal with the Android activity API. You are completely in control of when activities come and go, and the Firebase SDKs are just at your disposal to populate the views in your activity.

Ad
source: stackoverflow.com
Ad