-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: [Android] NavigateToFirstViewModel()
not called on Android when SplashScreenActivity
is derived from MvxActivity
#4854
Comments
NavigateToFirstViewModel
not called on Android
NavigateToFirstViewModel
not called on AndroidNavigateToFirstViewModel()
not called on Android
NavigateToFirstViewModel()
not called on AndroidNavigateToFirstViewModel()
not called on Android when SplashScreenActivity
is derived from MvxActivity
NavigateToFirstViewModel()
not called on Android when SplashScreenActivity
is derived from MvxActivity
NavigateToFirstViewModel()
not called on Android when SplashScreenActivity
is derived from MvxActivity
This doesn't seem like a bug, but rather a misunderstanding of how MvvmCross works. Making an Activity and calling it something with splash screen doesn't magically do anything. You need to have a MvxAndroidApplication which does the initialization of Setup and navigates to the VM registered in your App class. Refer to the playground app or some of the samples in the samples repo. TipCalc should be fairly up to date. |
@Cheesebaron Yes, everything is already setup as per the documentation. |
@Cheesebaron I also checked the TipCalc app, that hasn't been updated as the |
The splash screen is not the important part, but rather the MainApplication. MvvmCross doesn't rely on the splash anymore for setup. You need to provide a bit more info so I can help you. Code snippets would be a good start |
|
@Cheesebaron Above is my Application class for Android. I have a Custom AppStart and Setup as well. |
|
|
@Cheesebaron I have added more info. Please have a look. |
You don't call You main application doesn't specify your
|
@Cheesebaron Is there a difference between how to specify the |
MvvmCross does the intial navigation on Android very weird with a proxy Personally I solved the issue but implementing my own startup navigation: |
@entdark you don't have to have the As for having a single navigation host to do Fragment navigation, you can do regardless of a |
@Cheesebaron Thank you! One more question, |
@Cheesebaron Thank You! |
Unfortunantely currently MvvmCross never calls |
@entdark That's exactily what I found when I was checking out the |
And proper startup navigation should be after Main Launcher |
@Cheesebaron @entdark My issue was completely different from what I initially thought. |
Description
I am migrating Xamarin.Native to .NET8 and also migrating from MvvmCross 8.0.2 to MvvmCross 9.1.1 with it.
I was able to make the .net8-ios project work. But the .net-android project starts but gets stuck at SplashScreenActivity.
Steps to Reproduce
AppStart
.public class SplashScreenActivity : MvxActivity
NavigateToFirstViewModel()
method inAppStart
is never called. The same works fine on iOS.Link to public reproduction project repository
No response
Version with bug
Unknown/Other
Is this a regression from previous behavior?
Yes, this used to work in a previous version
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No response
The text was updated successfully, but these errors were encountered: