PlusMinus, thanks for this amazing website & the informative tutorials. I have learned more from here than from Google's documentation / groups.
Anyways, I am new to the Android world so please bear with me if this sounds like a beginner question.
When I click a button on my application's main view, it launches a service. The idea is that this service can run in the background & notify users when an even happens (such as change in location).
Here is how I am launching the service (which works just fine)...
However, I am having trouble with notifying when a location change occurs. The notification works if I use the NotificationManager's NotifyWithText method but errors out with a "BadTokenException: Unable to Add Window", if I try to use AlertDialogs or a custom activity view (say to launch the mapview).
I think the service is having trouble finding reference to the active view on the emulator. Any suggestions?
Here is how I am launching the custom view...
I get the error "WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?."
I would really appreciate if someone can guide me on what would be the appropriate way to launch a custom view (or even an AlertDialog) from within the service.
Thanks In Advance,