【发布时间】:2020-06-04 23:53:25
【问题描述】:
当任何连接更改时触发CrossConnectivity.Current.ConnectivityChanged 事件:
CrossConnectivity.Current.ConnectivityChanged += async (sender, args) =>
{
if (!args.IsConnected)
DependencyService.Get<ISQLite>().ShowSnackBar("No Internet Connection");
};
那么当在 Xamarin.Forms 中的 CrossGeolocator 插件上发现任何更改时,如何检测 GPS 开/关?
【问题讨论】:
-
我建议你使用GeolocatorPlugin.
标签: xamarin xamarin.forms