hello friends, i want receive update user location and show in text view only once and remove update location when it received. i must use foreground service for that ? sorry for bad writting.
No.
The document is saying that if you need to continuously get user's location, then you need that foreground service. In your case, you do not need that service, because you need to get user's location only once.