protected async override void OnStart() { // Handle when your app starts IEnumerable <string> collection = await fileEngine.GetFilesAsync(); if (collection.Contains("AccessToken")) { accessToken = await fileEngine.ReadTextAsync("AccessToken"); } //User already login then navigate to Dashboard if (string.IsNullOrEmpty(accessToken)) { MainPage = new NavigationPage(new MainPage()); } else { MainPage = new NavigationPage(new DashboardPage()); } }
public Task <string> ReadTextAsync(string storedText) { return(fileEngine.ReadTextAsync(storedText)); }