maui-geolocation

Provides DI-friendly geolocation service for .NET MAUI apps.

Updated Dec 25, 2025
One-click install
npx skills add https://github.com/heldercsousa/MyVocaList --skill maui-geolocation-heldercsousa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: maui-geolocation
Source: https://github.com/heldercsousa/MyVocaList/tree/main/.claude/skills/maui-geolocation
Command: npx skills add https://github.com/heldercsousa/MyVocaList --skill maui-geolocation-heldercsousa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Access to device geolocation in .NET MAUI apps often requires boilerplate, platform-specific handling, and manual permission management.

Core Features & Use Cases

  • One-shot location retrieval using Geolocation.Default.GetLocationAsync with configurable accuracy and timeout.
  • Continuous location tracking via StartListeningForegroundAsync and LocationChanged events, along with CancellationToken support.
  • DI-friendly service wrapper and clear platform-permission guidance to streamline MVVM integrations.

Quick Start

Request the current location by invoking Geolocation.Default.GetLocationAsync with a GeolocationRequest and a CancellationToken, and handle permission prompts if needed.

Frequently Asked Questions about maui-geolocation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get continuous geolocation updates in a .NET MAUI app?

Track continuous geolocation in .NET MAUI by calling StartListeningForegroundAsync and handling LocationChanged events with CancellationToken support. This provides ongoing location updates for active foreground scenarios.

What platform permissions do I need for .NET MAUI device location access?

Device location access in .NET MAUI requires configuring platform-specific permissions for Android, iOS, macOS, and Windows before querying coordinates. The Skill provides clear guidance to manage these prompts correctly.

How do I retrieve a one-shot location in dotnet-maui using GeolocationRequest?

Retrieve a one-shot location in dotnet-maui by invoking Geolocation.Default.GetLocationAsync with a configured GeolocationRequest and a CancellationToken. This handles accuracy and timeout settings for the fetch.

Can I integrate geolocation services into an MVVM app with dependency injection?

Yes, you can integrate geolocation into MVVM apps using a DI-friendly service wrapper. This wrapper streamlines dependency injection and manages one-shot or continuous location retrieval logic for your view models.

Does .NET MAUI geolocation support mock-location detection?

Yes, .NET MAUI geolocation handling includes mock-location detection to identify spoofed coordinates. This ensures the retrieved device location data is authentic and not artificially simulated.