public void IntialSetup(string athleteId, string accessToken) { DataManipulatorHandler.CreateSingleton(athleteId, accessToken); activityCacheHandler = new ActivityCacheHandler(); activityCacheHandler.Init(Int64.Parse(athleteId)); Title = "Alerts"; this.Seconds = 10; }
public void InitliseServiceAndCache(string athleteId, string stravaId, string accessToken) { activitySummaryServiceHandler = new ActivitySummaryServiceHandler(); activitySummaryCacheHandler = new ActivitySummaryCacheHandler(); activityServiceHandler = new ActivityServiceHandler(); activityCacheHandler = new ActivityCacheHandler(); activitySummaryServiceHandler.Init(athleteId, stravaId, accessToken); activityServiceHandler.Init(athleteId, stravaId, accessToken); activityCacheHandler.Init(Int64.Parse(athleteId)); }
public async void SyncCachedActivities() { try { await CreateActivites(); foreach (var activity in await FindAllActivities()) { activityCacheHandler.Init(activity.activityId, activity.athleteId.athleteId, activity.stravaid, activity.name, activity.startDate, activity.timeZone); await activityCacheHandler.Create(); } } catch (Exception) { await DisplayAlert("Error", "Sync Failure", "OK"); } }
private DataManipulatorHandler(string athleteId, string accessToken) { this.AccessToken = accessToken; activityCacheHandler = new ActivityCacheHandler(); activityCacheHandler.Init(Int64.Parse(athleteId)); }