Skip to content

Document LocationRequest builder options - #567

Open
jonathanpeppers wants to merge 2 commits into
mainfrom
jonathanpeppers-document-android-locations-apis
Open

Document LocationRequest builder options#567
jonathanpeppers wants to merge 2 commits into
mainfrom
jonathanpeppers-document-android-locations-apis

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Summary

  • Document the Android 12+ LocationRequest.Builder update-interval, duration, batching, update-count, and distance configuration methods.
  • Preserve the unsupported SetQuality source gap and all unrelated placeholders.

Sources

Validation

  • Parsed docs/xml/Android.Locations/LocationRequest+Builder.xml as XML.
  • Confirmed CRLF-only line endings (574 CRLF; 0 LF-only; 0 CR-only).
  • Ran git diff --check.
  • Confirmed zero To be added. placeholders in the seven documented members; 15 unrelated placeholders remain in the file.

Refs #104

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and SetMinUpdateIntervalMillis.
  • 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.

Comment thread docs/xml/Android.Locations/LocationRequest+Builder.xml
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers
jonathanpeppers requested review from dalexsoto and removed request for dalexsoto August 15, 2026 15:12
@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

1 similar comment
@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 0 through float.MaxValue; float.PositiveInfinity and NaN throw IllegalArgumentException, so "non-negative" is too broad.

Please correct these contracts in LocationRequest+Builder.xml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants