tauri-apps / tauri-apps/plugins-workspace
Geolocation permissions to recognized in AndroidManifest.xml
- Dominant language
- Rust
- Stars
- 1.8k
- Forks
- 602
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 9
Description
I've followed the installation instructions but cannot get the geolocation plugin to work. After installing with:
```bash
pnpm add @tauri-apps/plugin-geolocation
```
My `AndroidManifest.xml` file was not updated. I manually added the necessary permissions.
`src-tauri/gen/android/app/src/main/AndroidManifest.xml`:
```xml
...
```
I have this in the `layout.svelte` file in my SvelteKit app:
```typescript
onMount(async () => {
let permissions = await checkPermissions();
if (permissions.location === "prompt" || permissions.location === "prompt-with-rationale") {
permissions = await requestPermissions(["location"]);
}
console.log(JSON.stringify(permissions));
});
```
However, upon running the app, I get this error:
```
Uncaught (in promise) Missing the following permissions in AndroidManifest.xml:
android.permission.ACCESS_FINE_LOCATION
android.permission.ACCESS_COARSE_LOCATION
```
What am I missing?
Contributor guide
Assessment
This issue has not been assessed yet.