The main page in my application requires a custom page renderer (and an activity). When the application launches, I initially need to display a login page (a simple Forms page). After some googling, it sounded like the recipe for this is to call PushModalAsync(new LoginPage()) in the OnAppearing method of my main page. The problem is that this doesn't work. The login page ends up behind the main page and not on top of it.
I'm fairly new to both Android and Xamarin, so I don't know exactly what's going on. That said, I could tell that the OnCreate() method of the main page's activity was actually firing after the constructor of the login page (rather than before). I assume this is a thread timing issue, related to the main page's renderer calling StartActivity() and the resulting delay before the OnCreate() method is actually called.
I've tried to work around the issue to no avail. For example, I tried calling PushModalAsync from the main page's activity's OnStart() method and even that didn't work (although it did result in the login page's constructor being called after the main page's OnCreate()). Any advice?