LocationSource.OnLocationChangedListener
Stay organized with collections
Save and categorize content based on your preferences.
Handles a location update.
Public Methods
public abstract void onLocationChanged (Location
location)
Called when a new user location is known.
Parameters
location |
new location. Must not be null . |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["`LocationSource.OnLocationChangedListener` is an interface used to handle location updates for a user."],["It includes a single method, `onLocationChanged()`, which is triggered whenever a new location is identified."],["The `onLocationChanged()` method receives a non-null `Location` object as a parameter, containing the user's current location data."]]],["The `LocationSource.OnLocationChangedListener` interface handles location updates. It has one key method: `onLocationChanged(Location location)`. This method is invoked when a new user location is available. The method accepts a `Location` object as a parameter, representing the new location, and this parameter must not be null. This method's purpose is to notify the listener of changes in the user's location.\n"]]