I want to get the current GPS coordinates using the GoogleApiClient
as the LocationClient
is now deprecated. But as I have more than one activity using the client, I don't want to repeatedly write an inner class for each activity.
But when I write an external class GPS
defining the localization functionality, I cannot give any feedback from onLocationChanged(Location location)
to the activities, which call the class GPS
. How is this usually done? How can I access the location
object from within the calling activity? Or is this only possible with an inner class?