>>>>> "MM" == Mark Murphy <[email protected]> writes:

   MM> On Fri, Feb 18, 2011 at 1:25 PM, Jake Colman <[email protected]> wrote:

   >> 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?

   MM> The only difference I'd put in there is keep track of your
   MM> dates. Just because somebody reboots their phone doesn't mean
   MM> sunrise has changed.  If the device has been off for an extended
   MM> period (e.g., plane), then the app widget probably should have a
   MM> "please wait" indicator. If the device was only off briefly,
   MM> though, there's no sense in making them wait.

   MM> Otherwise, I don't see any obvious problems, other than the
   MM> complexity of the get-me-a-location service, if LocationPoller
   MM> either doesn't work or doesn't fit your needs.

Thank you for all your help - it's almost like having an interactive
version of your book!

In my instance, I don't much care whether I get a fine or coarse
location fix.  And I cannot know whether the user will even have a GPS.
Does this imply that I always just ask for a network fix?  If I use the
LocationPoller (or anything similar) will it get only get what I ask for
even if a better fix is available?  And is it smart enough to know not
to do alot of work if the phone has not moved?

-- 
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

Reply via email to