I am writing an application which needs a connected location client in all the activities. How do the manage the state of the client?
I want to call the mLocationClient.connect()
only once to avoid hassle, and should be able to remove location updates / disconnect when the application stops.
How do I keep the location client connected across all activities, assuming I have connected to it in the splash screen Activity
?
Another question that arises here is, when I resume the paused application (not recreation), the app won't start with the splash screen. How do I maintain the connection in this case?
Thanks in advance.