Skip to content
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

Android Single Activity #11854

Merged
merged 4 commits into from
Jun 21, 2023
Merged

Android Single Activity #11854

merged 4 commits into from
Jun 21, 2023

Conversation

emmauss
Copy link
Contributor

@emmauss emmauss commented Jun 21, 2023

What does the pull request do?

This pr removes AvaloniaSplashActivity from the Android project. Initialization is now done in AvaloniaMainActivity.
This is to prevent a crash that occurs when the Android OS kills the app process, but as the last activity on the stack is the MainActivity, which can't be directly instantiated currently.
This also improves intent handling, in cases where we want to launch the app when an event occurs in the os, outside of being launched from the launcher.

What is the current behavior?

What is the updated/expected behavior with this PR?

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

AvaloniaSplashActivity is removed.
MainActivity in apps now derives from AvaloniaMainActivity<App>.

Obsoletions / Deprecations

Fixed issues

@emmauss emmauss requested a review from kekekeks June 21, 2023 10:47
@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0036837-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@kekekeks
Copy link
Member

haven't tested, api-wise looks ok

@emmauss emmauss marked this pull request as ready for review June 21, 2023 12:02
@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0036856-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added this pull request to the merge queue Jun 21, 2023
Merged via the queue into master with commit 00dc606 Jun 21, 2023
@maxkatz6 maxkatz6 deleted the emmaus/android_single_activity branch June 21, 2023 22:27
@mysteryx93
Copy link

Does this change the Android project template?

@emmauss
Copy link
Contributor Author

emmauss commented Jul 2, 2023

Does this change the Android project template?

Yes, it does. A release will be made soon for the xplat template

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants