pb4now pb4now - 1 year ago 84
Android Question

Checking for changes in Firebase database while application is closed

What is the 'right' way to set up checking for changes of a value in Firebase DB, while application is closed, and then push notifications to a user?

Should I use

classes to get that done?

Answer Source

You should use android Service to run your tasks on background even after your app has closed.

Check this link on how to use the android services to run background tasks.

Also Alarm and pending services work best if your background task gets triggered upon change in other system parameters such as connectivity or any specific time interval or time.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download