private void Connectivity_ConnectivityChanged(object sender, Xamarin.Essentials.ConnectivityChangedEventArgs e) { if (e.NetworkAccess != NetworkAccess.Internet) { _offlineManager = null; _offlineManager = OfflineManager.GetInstance(Application.Context); } }
private Task <OfflineTilePyramidRegionDefinition> GetDefinition() { var tcs = new TaskCompletionSource <OfflineTilePyramidRegionDefinition>(); OfflineManager.GetInstance(_context).ListOfflineRegions(new OfflineRegionCallback() { OnListCallback = regions => { tcs.SetResult(regions.Last().Definition as OfflineTilePyramidRegionDefinition); } }); return(tcs.Task); }
public OfflineStorageService() { offlineManager = OfflineManager.GetInstance(Android.App.Application.Context); RunningTasks = new List <TaskCompletionSource <OfflinePack> >(); }
public MapBoxOfflineService() { _offlineManager = OfflineManager.GetInstance(Application.Context); Connectivity.ConnectivityChanged += Connectivity_ConnectivityChanged; }
public OfflineStorageService() { offlineManager = OfflineManager.GetInstance(Android.App.Application.Context); }