From f90d33c738128f4895ad683f8a9d7f49f8c445b2 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Sat, 15 Aug 2026 10:01:26 -0500 Subject: [PATCH 1/3] Document location request builder options Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../LocationRequest+Builder.xml | 105 +++++++++++++----- 1 file changed, 78 insertions(+), 27 deletions(-) diff --git a/docs/xml/Android.Locations/LocationRequest+Builder.xml b/docs/xml/Android.Locations/LocationRequest+Builder.xml index 8df88624a..3827ee3da 100644 --- a/docs/xml/Android.Locations/LocationRequest+Builder.xml +++ b/docs/xml/Android.Locations/LocationRequest+Builder.xml @@ -196,9 +196,16 @@ - To be added. - To be added. - To be added. + Clears an explicitly set minimum update interval and reverts to an implicit minimum update interval. + + The implicit minimum update interval is a sensible default between zero and the request interval. + Java documentation for android.location.LocationRequest.Builder.clearMinUpdateIntervalMillis(). + + Portions of this page are modifications based on work created and shared by the + Android Open Source Project + and used according to terms described in the + Creative Commons 2.5 Attribution License. + @@ -257,10 +264,17 @@ - To be added. - To be added. - To be added. - To be added. + The duration, in milliseconds, before the request is automatically removed. The value must be at least 1. + Sets the duration that this request continues before it is automatically removed. + + Defaults to long.MaxValue, which represents an unlimited duration. + Java documentation for android.location.LocationRequest.Builder.setDurationMillis(long). + + Portions of this page are modifications based on work created and shared by the + Android Open Source Project + and used according to terms described in the + Creative Commons 2.5 Attribution License. + @@ -290,10 +304,18 @@ - To be added. - To be added. - To be added. - To be added. + The requested update interval, in milliseconds. The value must be non-negative. + Sets the request interval. + + Setting the interval to prevents this request from actively generating location updates, while allowing it to receive updates generated by other requests. A passive request must have an explicit minimum update interval. + Locations can be available more frequently than this interval; use to control that behavior. + Java documentation for android.location.LocationRequest.Builder.setIntervalMillis(long). + + Portions of this page are modifications based on work created and shared by the + Android Open Source Project + and used according to terms described in the + Creative Commons 2.5 Attribution License. + @@ -323,10 +345,17 @@ - To be added. - To be added. - To be added. - To be added. + The maximum delay, in milliseconds, before an update can be delivered in a batch. The value must be non-negative. + Sets the maximum time an update can be delayed to enable location batching. + + If the maximum update delay is at least twice the request interval, location providers can provide batched results. The default is zero, which disables batching. + Java documentation for android.location.LocationRequest.Builder.setMaxUpdateDelayMillis(long). + + Portions of this page are modifications based on work created and shared by the + Android Open Source Project + and used according to terms described in the + Creative Commons 2.5 Attribution License. + @@ -356,10 +385,17 @@ - To be added. - To be added. - To be added. - To be added. + The maximum number of updates before the request is removed. The value must be at least 1. + Sets the maximum number of location updates before this request is automatically removed. + + The default is int.MaxValue, which represents an unlimited number of updates. + Java documentation for android.location.LocationRequest.Builder.setMaxUpdates(int). + + Portions of this page are modifications based on work created and shared by the + Android Open Source Project + and used according to terms described in the + Creative Commons 2.5 Attribution License. + @@ -389,10 +425,17 @@ - To be added. - To be added. - To be added. - To be added. + The minimum distance, in meters, between updates. The value must be non-negative. + Sets the minimum distance between location updates. + + A potential update that is closer to the preceding update than this distance is not delivered. The default is zero, which sets no minimum update distance. + Java documentation for android.location.LocationRequest.Builder.setMinUpdateDistanceMeters(float). + + Portions of this page are modifications based on work created and shared by the + Android Open Source Project + and used according to terms described in the + Creative Commons 2.5 Attribution License. + @@ -422,10 +465,18 @@ - To be added. - To be added. - To be added. - To be added. + The minimum interval, in milliseconds, between updates. The value must be non-negative. + Sets an explicit minimum update interval. + + When updates are available more frequently than the request interval, an update is delivered only after this interval has expired since the preceding update. Without an explicit value, the system chooses a sensible default between zero and the request interval. + When is called, the smaller of the request interval and this value becomes the built request's minimum update interval. + Java documentation for android.location.LocationRequest.Builder.setMinUpdateIntervalMillis(long). + + Portions of this page are modifications based on work created and shared by the + Android Open Source Project + and used according to terms described in the + Creative Commons 2.5 Attribution License. + From 4bb743daf61f68a374446df6dd842d3dd627bea6 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Sat, 15 Aug 2026 10:12:07 -0500 Subject: [PATCH 2/3] Document fluent builder returns Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- docs/xml/Android.Locations/LocationRequest+Builder.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/xml/Android.Locations/LocationRequest+Builder.xml b/docs/xml/Android.Locations/LocationRequest+Builder.xml index 3827ee3da..e56ae1426 100644 --- a/docs/xml/Android.Locations/LocationRequest+Builder.xml +++ b/docs/xml/Android.Locations/LocationRequest+Builder.xml @@ -197,6 +197,7 @@ Clears an explicitly set minimum update interval and reverts to an implicit minimum update interval. + This builder. The implicit minimum update interval is a sensible default between zero and the request interval. Java documentation for android.location.LocationRequest.Builder.clearMinUpdateIntervalMillis(). @@ -266,6 +267,7 @@ The duration, in milliseconds, before the request is automatically removed. The value must be at least 1. Sets the duration that this request continues before it is automatically removed. + This builder. Defaults to long.MaxValue, which represents an unlimited duration. Java documentation for android.location.LocationRequest.Builder.setDurationMillis(long). @@ -306,6 +308,7 @@ The requested update interval, in milliseconds. The value must be non-negative. Sets the request interval. + This builder. Setting the interval to prevents this request from actively generating location updates, while allowing it to receive updates generated by other requests. A passive request must have an explicit minimum update interval. Locations can be available more frequently than this interval; use to control that behavior. @@ -347,6 +350,7 @@ The maximum delay, in milliseconds, before an update can be delivered in a batch. The value must be non-negative. Sets the maximum time an update can be delayed to enable location batching. + This builder. If the maximum update delay is at least twice the request interval, location providers can provide batched results. The default is zero, which disables batching. Java documentation for android.location.LocationRequest.Builder.setMaxUpdateDelayMillis(long). @@ -387,6 +391,7 @@ The maximum number of updates before the request is removed. The value must be at least 1. Sets the maximum number of location updates before this request is automatically removed. + This builder. The default is int.MaxValue, which represents an unlimited number of updates. Java documentation for android.location.LocationRequest.Builder.setMaxUpdates(int). @@ -427,6 +432,7 @@ The minimum distance, in meters, between updates. The value must be non-negative. Sets the minimum distance between location updates. + This builder. A potential update that is closer to the preceding update than this distance is not delivered. The default is zero, which sets no minimum update distance. Java documentation for android.location.LocationRequest.Builder.setMinUpdateDistanceMeters(float). @@ -467,6 +473,7 @@ The minimum interval, in milliseconds, between updates. The value must be non-negative. Sets an explicit minimum update interval. + This builder. When updates are available more frequently than the request interval, an update is delivered only after this interval has expired since the preceding update. Without an explicit value, the system chooses a sensible default between zero and the request interval. When is called, the smaller of the request interval and this value becomes the built request's minimum update interval. From 4d2ed972ec62e32ec1e2c6ce98e6c1ed8fc90390 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Sun, 16 Aug 2026 08:37:21 -0500 Subject: [PATCH 3/3] Correct location request constraints Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- docs/xml/Android.Locations/LocationRequest+Builder.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/xml/Android.Locations/LocationRequest+Builder.xml b/docs/xml/Android.Locations/LocationRequest+Builder.xml index e56ae1426..5534a606e 100644 --- a/docs/xml/Android.Locations/LocationRequest+Builder.xml +++ b/docs/xml/Android.Locations/LocationRequest+Builder.xml @@ -430,9 +430,10 @@ - The minimum distance, in meters, between updates. The value must be non-negative. + The minimum distance, in meters, between updates. The value must be finite and between 0.0f and float.MaxValue inclusive. Sets the minimum distance between location updates. This builder. + If is float.PositiveInfinity or float.NaN. A potential update that is closer to the preceding update than this distance is not delivered. The default is zero, which sets no minimum update distance. Java documentation for android.location.LocationRequest.Builder.setMinUpdateDistanceMeters(float). @@ -475,7 +476,7 @@ Sets an explicit minimum update interval. This builder. - When updates are available more frequently than the request interval, an update is delivered only after this interval has expired since the preceding update. Without an explicit value, the system chooses a sensible default between zero and the request interval. + When updates are available more frequently than the request interval, this interval controls how frequently updates are delivered. Android allows a small amount of timing jitter, so an update can arrive slightly earlier than the specified interval. Without an explicit value, the system chooses a sensible default between zero and the request interval. When is called, the smaller of the request interval and this value becomes the built request's minimum update interval. Java documentation for android.location.LocationRequest.Builder.setMinUpdateIntervalMillis(long).