Hello I have a short question:
"Is it possible to restart the main app constructor?" or
"Is it possible to restart a Xamarin.Forms app?"
To be more precise what I mean by this: my app checks on start if there is an internet connection, if not it displays a "oh no seems you have no connection" page.
On this page I want to have a button that restarts the app.
I tried the following:
private void ButtonRestart_OnClicked(object sender, EventArgs e)
{
(Application.Current).MainPage = new LoginPage();
}
or:
private void ButtonRestart_OnClicked(object sender, EventArgs e)
{
Application.SetCurrentApplication(new App());
App.Current.MainPage = new LoginPage();
}
On some websites I read: "ios and the playstore do not accept apps that can restart themselves". Is that true?