Skip to content

Commit

Permalink
Merge pull request #18165 from unoplatform/mergify/bp/release/stable/…
Browse files Browse the repository at this point in the history
…5.4/pr-18155

docs: Add Android platform specific for `RequestAccessAsync` (backport #18155)
  • Loading branch information
jeromelaban authored Sep 9, 2024
2 parents 1ef3b44 + 17f8836 commit d5884a7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/articles/features/windows-devices-geolocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ The following `Geolocator` APIs are implemented on Android, iOS, macOS, and WASM
* `DesiredAccuracy`
* `DesiredAccuracyInMeters`

### Platform-specific Requirements

#### Android

When using the `RequestAccessAsync` method on Android, you must configure one permission before using this API in your project. To do so, add the following to your `AndroidManifest.xml` file:

```xml
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
```

Additionally, when checking for this permission, ensure that `IsLocationEnabled` returns `true`; otherwise, the method will return `GeolocationAccessStatus.Denied`.

### Implementation notes

`StatusChanged` event is delivered to all `Geolocator` instances which have subscribers as a "broadcast". This is unusual, but in line with the UWP implementation.
Expand Down

0 comments on commit d5884a7

Please sign in to comment.