Lines Matching full:updates
1 page.title=Receiving Location Updates
13 <li><a href="#StartUpdates">Start Location Updates</a></li>
14 <li><a href="#StopUpdates">Stop Location Updates</a></li>
41 a more direct approach is to request periodic updates from Location Services. In
42 response, Location Services automatically updates your app with the best available location,
46 To get periodic location updates from Location Services, you send a request using a location
50 frequency of the updates are affected by the location permissions you've requested and the
59 permission you choose affects the accuracy of the location updates you receive.
177 Log.d("Location Updates",
200 "Location Updates");
216 Before you request location updates, you must first implement the interfaces that Location
248 * request the current location or start periodic updates
306 Location Services sends location updates to your app either as an {@link android.content.Intent}
309 to receive updates in the form of an {@link android.content.Intent}, read the lesson
329 // Define the callback method that receives location updates
342 Now that you have the callbacks prepared, you can set up the request for location updates.
343 The first step is to specify the parameters that control the updates.
348 Location Services allows you to control the interval between updates and the location accuracy
351 object and then sending this object as part of your request to start updates.
364 updates. If no other apps are receiving updates from Location Services, your app will
365 receive updates at this rate.
374 location updates. You need to set this rate because other apps also affect the rate
375 at which updates are sent. Location Services sends out updates at the fastest rate that any
391 apps have a faster rate request outstanding, your app receives updates at the rate you specified
398 Next, set the accuracy parameter. In a foreground app, you need constant location updates with
450 app from receiving updates it can't use. Once the long-running work is done, set the fastest
453 <!-- Start Location Updates -->
454 <h2 id="StartUpdates">Start Location Updates</h2>
456 To send the request for location updates, create a location client in
460 Since your client must be connected for your app to receive updates, you should
464 can request updates, make the update request in
468 Remember that the user may want to turn off location updates for various reasons. You should
469 provide a way for the user to do this, and you should ensure that you don't start updates in
470 {@link android.support.v4.app.FragmentActivity#onStart onStart()} if updates were previously
479 and request updates in {@link android.support.v4.app.FragmentActivity#onStart onStart()}:
505 // Start with updates turned off
512 // Save the current setting for updates
527 * Get any previous setting for location updates
534 // Otherwise, turn off location updates
544 * request the current location or start periodic updates
550 // If already requested, start periodic updates
563 Stop Location Updates
565 <h2 id="StopUpdates">Stop Location Updates</h2>
567 To stop location updates, save the state of the update flag in
568 {@link android.support.v4.app.FragmentActivity#onPause onPause()}, and stop updates in
581 * Stop updates and disconnect.
588 * Remove location updates for a listener.
605 You now have the basic structure of an app that requests and receives periodic location updates.