On Tue, Nov 23, 2010 at 1:55 PM, victor lima
<[email protected]> wrote:
> Ok, what I am trying to do is:
>
>  1) Start my application, the users selects a certain area in a map
>  2) The user closes the application
>  3) I want to be notified when the user enters/leave that certain area
>
>  By reading 
> http://developer.android.com/guide/topics/location/obtaining-user-location.html
> I guess I'll have to create a service ( or whatever I need to do in
> Android that allows my classes to run in background, while the
> application has exited), and then request to be updated about the user
> location, and then do some math to see if the user is actually inside
> or outside my pre-determined area, and then issue the proper feedback
> to the user. Does that make sense?

The everlasting service should not be necessary. Use
addProximityAlert() for various coordinates around the perimeter, then
react as they get close to (or past) the fence. That way, you do not
need to keep a service in memory, which tends not to work forever.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to