Skip to content

Commit

Permalink
docs: Add Android platform specific for RequestAccessAsync
Browse files Browse the repository at this point in the history
(cherry picked from commit 31e7bc2)
  • Loading branch information
morning4coffe-dev authored and mergify[bot] committed Sep 9, 2024
1 parent 1ef3b44 commit 17f8836
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 17f8836

Please sign in to comment.