I am writing a fairly simple application. It has a login page, then navigates to a data entry page. On iOS and Windows Phone, this works fine. On Android, the application just hangs when trying to do navigation. By hangs, I mean that there is an activity indicator on the screen, and it stops spinning when the navigation tries to begin.
public class App : Application
{
public App ()
{
MainPage = new NavigationPage(new AuthorizeContentPage());
}
protected override void OnStart ()
{
}
protected override void OnSleep ()
{
// Handle when your app sleeps
}
protected override async void OnResume ()
{
}
}
As you can see, I am using a NavigationPage(which is typically the issue in this case). Here is the code after login is complete...
// event fired from view model
private void LoginCompleted (object sender, EventArgs e)
{
try
{
Device.BeginInvokeOnMainThread (async () =>
{
await Navigation.PushAsync (new VisitContentPage());
});
}
catch(Exception ex)
{
Debug.WriteLine("Some exception occurred: " + ex.Message);
}
Debug.WriteLine("We got here. Success!!!");
}
Again, very simple stuff. Neither one of the writelines get hit. Nothing in the application output except for lines like...
[Mono] GC_OLD_BRIDGE num-objects 5478 num_hash_entries 5478 sccs size 5478 init 0.00ms df1 1.18ms sort 0.35ms dfs2 0.31ms setup-cb 0.53ms free-data 0.32ms links 0/0/0/0 dfs passes 10956/5478
[Mono] GC_MINOR: (Nursery full) pause 7.91ms, total 7.29ms, bridge 15.43ms promoted 496K major 6000K los 1565K
This happens on my HTC M8 running 5.0.1. I've also tried on the Xamarin Android Player on multiple 4.4 and 5.1 emulators. Happens the same on everything I tried it on.
I'm not really sure what to do next. Client is certainly not happy.
Thoughts? Suggestions?
Versions
- Xamarin Studio: 5.9.4
- Xamarin.Android: 5.1.4.16 (Business)
- Xamarin.Forms: 1.4.2.6359