You can use the LocationSource
pattern to supply your own locations, which could come from whatever. LocationSource
is an interface, which you would implement on some object that can supply location data. You register this with setLocationSource()
on the GoogleMap
. You implement activate()
and deactivate()
methods on your LocationSource
that will get called to let you know when you should start and stop pushing over locations. As you get location fixes in, you call onLocationChanged()
on a supplied OnLocationChangedListener
.
This sample project demonstrates the use of LocationSource
.