>>>>> "MM" == Mark Murphy <[email protected]> writes:
MM> 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? MM> 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? MM> It is not completely crazy, if that is what you mean. Personally, MM> I'd recommend you just save the Location somewhere (e.g., file) MM> rather than rely upon getLastKnownLocation(). Hmmm. Now we are getting somewhere. 'locationupdater' runs every hour and updates a file with current location. 'sunrise' runs every 60 seconds (or whatever) and reads the file for the location. When the app is first installed to the homescreen, 'sunrise' won't display a time until 'locationupdater' gets its first fix. This seems like the simplest way to reliably get what I need and does not rely on alot of extra code, alarms or listener updates. Would you agree? Or am I still missing something fundamental? -- Jake Colman -- Android Tinkerer -- 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

