dotnet/maui

Add support for MslAltitudeMeters in Essentials Geolocation on Android

已關閉

#27,554 建立於 2025年2月4日

 (1 則留言) (0 個反應) (0 位負責人)C# (1,951 個分叉)batch import
area-essentialsgood first issueproposal/opent/enhancement ☀️

倉庫指標

星標
 (23,245 顆星)
PR 合併指標
 (平均合併 47天 9小時) (30 天內合併 248 個 PR)

描述

Description

In API Level 34 Google introduced https://developer.android.com/reference/android/location/Location#getMslAltitudeMeters(). If available it should be used as altitude source to get consistent results on all platforms.

Public API Changes

Should be either the new default for Android or an option in GeolocationRequest and GeolocationListeningRequest.

Intended Use-Case

This change would make getting GPS altitude consistent on all platforms without manually correcting it.

.NET MAUI Recommended implementation

Because this API isn't supported on Windows.

I would be curious if there's a way to expose the platform location type through the xplat type.

For example, on all of our DragAndDrop args we've added versions of "PlatformDragEventArgs" which expose the underlying platform events.

This way we don't have to go one by one for every API that's on some xplat implementations but not others

貢獻者指南