I am making an android app, that mostly runs in the background, communicating with firebase real-time database. My apps need to be in sync with firebase database all the time. Currently, I am only doing database write operations in my service. I have been using FCM for syncing database states, but FCM is not very reliable in my case.
Will it be wise decision to listen for database changes by attaching a listener to firebase database? By attaching a listener, I think it will keep an open connection with the database, which might increase battery usage.
My concern here is related to battery usage.