'Xamarin Navigation

I have a simple xamarin application with splash screen, page 1 (Main Page), page 2 (New User), page 3 (user profile). So page 1 have to buttons new user and existing user.

When user click new user, the user get navigated to page 2. When user click existing user, the user sign in using ad b2c, then get redirected to page 3 which is the user profile.

Everything works as expected, however when the user sign in, the token is stored such that the user will be signed in automatically when the main page (page 1) is displayed.

What I want to achieve is that I only want the main page to be displayed to first time users only, such that when user create quit and reopen the app (after the splash screen is displayed), ideally the main page is next but I want the main page to be a different page (let me say page 4), the user selection for the first time (new user or existing user) should be remembered such that when user reopen the app, the new main page (page 4) will be shown after the splash screen then automatically navigate to the main respective page based on the user selection (either new user page or user profile page)



Solution 1:[1]

If you are looking for something about data caching in xamarin forms,

you can try Monkey Cache which enables developers to easily cache any data for a limited amount of time.

All data for Monkey Cache is stored and retrieved in a Barrel. You can check the full resource here: https://github.com/jamesmontemagno/monkey-cache

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Adrain Zhu -MSFT