Google Maps Android API V2 has a LocationSource. From the docs:
"The GoogleMap object has a built-in location provider for its level of my location, but you can replace it with another that implements this interface."
LocationSource
I assume that you will need to use this in conjunction with LocationSource.OnLocationChangedListener
Update
Figured it out. If you want to do something similar to runOnFirstFix, here is a basic example that waits until a custom location is available, and then animate the map to focus on its location.
public class MyLocationMapFragmentActivity extends FragmentActivity implements LocationListener, LocationSource { private GoogleMap mMap; private OnLocationChangedListener mListener; private LocationManager locationManager; private Context mContext; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.basic_map); this.mContext = this; locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
Update 2
If you are interested in focusing the map on the user's location when their location is disconnected from the screen (for example, MyLocationOverlay does in the old API), see this answer
or this blog post: Google Maps Android API V2 MyLocation LocationSource and event handling
source share