enable-location

Xamarin Forms: How to implement location share feature?

和自甴很熟 提交于 2021-02-11 14:44:23
问题 Whenever I am opening my app I need to check the location is on or off. If the location is off, I need to show an alert to the user to enable location share like the below screenshot: I try this using the dependency service from this thread: The interface on shared Project: public interface ILocSettings { void OpenSettings(); } Android implementation [assembly: Dependency(typeof(LocationShare))] namespace ProjectName.Droid { public class LocationShare : ILocSettings { public void OpenSettings