I'm using the LocationManager to receive location updates via an
IntentReceiver.  The intent receiver looks something like this:

public class handleLocationUpdate extends IntentReceiver {
  public void onReceiveIntent(Context context, Intent intent) {
      Location loc = (Location) intent.getExtra("location");

      Double lat = loc.getLatitude()*1E6;
      Double lng = loc.getLongitude()*1E6;
      Point point = new Point(lat.intValue(), lng.intValue());
      mapController.centerMapTo(point, false);

      setContentView(mapView);
  }
}


I see that the getExtra() method is now deprecated.  The docs state to
use the type safe methods now, but there isn't a type safe method for
receiving "Location" objects, so what is the preferred way to retrieve
the Location object from the intent now?  I'm using sdk-m5-rc15.

Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to