0

I want to map the loaction from the location poller after the location is found using a broadcast receiver. I can't find any examples demonstrating this. What needs to happen after the onReceive method is executed and the location is found?

Thanks in advance,

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491

1 Answers1

0

Presumably, you would call startActivity() on something that can map those coordinates. Whether that is your own activity or a built-in one (e.g., via a geo: Uri) is up to you. If it is yours, you would need to arrange to send the latitude and longitude to your activity, such as via Intent extras.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Thank you for responding. I created the pending intent to a broadcast receiver in the onCreate method of a MapActivity. In the onReceive method of the broadcast receiver I get the GPS location. My question is that once I get the GPS locations what do I do to update the map overlay for the GPS location each time a new location is found? – Justin Fitzgerald Apr 12 '12 at 19:50
  • @JustinFitzgerald: Why are you bothering with `LocationPoller`, then? The complete and entire purpose behind `LocationPoller` is to get locations when you do not have a UI, such as on a scheduled basis. Just use `LocationManager` and `requestLocationUpdates()`. – CommonsWare Apr 12 '12 at 19:55