On Fri, Feb 18, 2011 at 12:57 PM, Jake Colman <[email protected]> wrote:
> Once I have a location, wouldn't getLastKnownLocation() return it to me?

Possibly. I have no idea how long Android holds onto those.

> In this scenario, the appwidget would start two services: sunrise and
> locationupdater.  The Sunrise service is kicked every 60 seconds and
> gets the last known location.  The locationupdater service runs every
> hour and gets a new location fix - which is picked up by the sunrise
> service the next time it runs.
>
> Does this make any sense?

It is not completely crazy, if that is what you mean. Personally, I'd
recommend you just save the Location somewhere (e.g., file) rather
than rely upon getLastKnownLocation().

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

Android 2.3 Programming 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