現在の座標を取得したいので、次に試します
GoogleMap gm=getMap();
gm.setMyLocationEnabled(true);
Location location=getMap().getMyLocation();
しかし、getMap() は null を返します。
Criteria criteria = new Criteria();
String provider = service.getBestProvider(criteria, false);
Location location = service.getLastKnownLocation(provider);
if (location.getLatitude()!=0){
LatLng userLocation = new LatLng(location.getLatitude(), location.getLongitude());
しかし、これは Android 2.3 で動作しますが、4.2 で動作します。null を返します。