Document LocationRequest builder options - #567
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the XML reference documentation for Android.Locations.LocationRequest.Builder (Android 12+/API 31+) to replace To be added. placeholders with detailed docs for several interval/duration/batching/update-count/distance configuration methods.
Changes:
- Added member documentation for
ClearMinUpdateIntervalMillis,SetDurationMillis,SetIntervalMillis,SetMaxUpdateDelayMillis,SetMaxUpdates,SetMinUpdateDistanceMeters, andSetMinUpdateIntervalMillis. - Added remarks content including behavior notes, Java reference links, and AOSP/CC BY 2.5 attribution blocks for the documented members.
Suppressed comments (6)
docs/xml/Android.Locations/LocationRequest+Builder.xml:269
- This method returns a LocationRequest.Builder, but the XML docs omit a element. For fluent builder APIs, the repo convention is to include This builder..
<summary>Sets the duration that this request continues before it is automatically removed.</summary>
<remarks>
docs/xml/Android.Locations/LocationRequest+Builder.xml:350
- This method returns a LocationRequest.Builder, but the XML docs omit a element; this leaves the fluent return undocumented in generated reference docs.
<summary>Sets the maximum time an update can be delayed to enable location batching.</summary>
<remarks>
docs/xml/Android.Locations/LocationRequest+Builder.xml:390
- This method returns a LocationRequest.Builder, but the XML docs omit a element. Consider documenting the fluent return as This builder..
<summary>Sets the maximum number of location updates before this request is automatically removed.</summary>
<remarks>
docs/xml/Android.Locations/LocationRequest+Builder.xml:430
- This method returns a LocationRequest.Builder, but the XML docs omit a element. Adding This builder. matches other Builder docs and makes the fluent pattern explicit.
<summary>Sets the minimum distance between location updates.</summary>
<remarks>
docs/xml/Android.Locations/LocationRequest+Builder.xml:470
- This method returns a LocationRequest.Builder, but the XML docs omit a element. The surrounding Builder docs in this repo typically include This builder. for fluent methods.
<summary>Sets an explicit minimum update interval.</summary>
<remarks>
docs/xml/Android.Locations/LocationRequest+Builder.xml:309
- This method returns a LocationRequest.Builder, but the XML docs omit a element. Adding This builder. keeps it consistent with other Builder XML docs in this repo.
<summary>Sets the request interval.</summary>
<remarks>
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
@dalexsoto review |
1 similar comment
|
@dalexsoto review |
dalexsoto
left a comment
There was a problem hiding this comment.
The fluent return documentation is fixed and the accepted SetQuality scope is preserved, but two platform contracts remain inaccurate:
- The minimum update interval is not a strict lower bound; Android permits small timing jitter, so updates may arrive slightly early.
- Minimum update distance must be finite from
0throughfloat.MaxValue;float.PositiveInfinityand NaN throwIllegalArgumentException, so "non-negative" is too broad.
Please correct these contracts in LocationRequest+Builder.xml.
Summary
LocationRequest.Builderupdate-interval, duration, batching, update-count, and distance configuration methods.SetQualitysource gap and all unrelated placeholders.Sources
Validation
docs/xml/Android.Locations/LocationRequest+Builder.xmlas XML.git diff --check.To be added.placeholders in the seven documented members; 15 unrelated placeholders remain in the file.Refs #104