Relative Content

Tag Archive for androidfirebasekotlingoogle-mapsfirebase-cloud-messaging

Android background service for location updates

I want to start a service for location updates in background what i want to achieve is i want to start the service when the user recevice notification from firebase FCM in onMessageReceived(remoteMessage: RemoteMessage) when the application is in forground the onMessageReceived start the service but when the app is killed or not in forground the location is not updated or the service does not run in the background. What is the proper approach to get the user location in background when the app is in background or in killed state