Mvvmcross: RunAppStart isn't called in Xamarin Form - Android project

Created on 19 Apr 2018  路  7Comments  路  Source: MvvmCross/MvvmCross



Steps to reproduce :scroll:

  1. create fresh project with xamarin forms and Mvvmcross 6.0. Here is my ready example https://github.com/bravekit/MvvmCrosss6-forms-Android-doesnt-start

  2. Compile and run Android project

Expected behavior :thinking:

Main page should be displayed

Actual behavior :bug:

App doesn't switch from SplashScreen to MainPage

Configuration :wrench:

Version: 6.0

Platform:

  • [ ] :iphone: iOS
  • [* ] :robot: Android
  • [ ] :checkered_flag: WPF
  • [ ] :earth_americas: UWP
  • [ ] :apple: MacOS
  • [ ] :tv: tvOS
  • [* ] :monkey: Xamarin.Forms

Is it a bug, or I just do something wrong?

android forms bug

Most helpful comment

I have migrate mvvmcross 6.0 to 6.2, and my application display SplashScreen then nothing.

After search, i found that RunAppStart isn't call in xamarin forms project.
if i replace it by RunAppStartAsync, it work.

Must i use RunAppStartAsync?

All 7 comments

It's not a bug. I had to correct setup splashActivity, now it works

@bravekit
I have the same issue, could you please share what was wrong? Thank you.

I pushed fix to my repository https://github.com/bravekit/MvvmCrosss6-forms-Android-doesnt-start
I don't know why, but MvvmCross doesn't call RunAppStart if we use MainActivity as

MainActivity : MvxFormsAppCompatActivity<MainViewModel>

I've created empty ViewModel (even without page) and create MainActivity as
MainActivity : MvxFormsAppCompatActivity<EmptyViewModel>

Now it works, but it seems it's a bug

Can you please reproduce this in the playground sample and submit as a PR for us to try to isolate the issue?

This should be fixed in 6.2

I have migrate mvvmcross 6.0 to 6.2, and my application display SplashScreen then nothing.

After search, i found that RunAppStart isn't call in xamarin forms project.
if i replace it by RunAppStartAsync, it work.

Must i use RunAppStartAsync?

RunAppStartAsync

I had the exact same issue, upgraded to 6.2 from 6.0 and Android would show nothing! Changed RunAppStart to RunAppStartAsync it worked.

Was this page helpful?
0 / 5 - 0 ratings