Skip to content

android: set or replace display to allow restarting UI when foreground service is enabled#564

Merged
not-fl3 merged 1 commit into
not-fl3:masterfrom
narodnik:andyfix
Jun 27, 2025
Merged

android: set or replace display to allow restarting UI when foreground service is enabled#564
not-fl3 merged 1 commit into
not-fl3:masterfrom
narodnik:andyfix

Conversation

@narodnik

Copy link
Copy Markdown
Contributor

On Android, when you have an app in the background for a few secs it will be closed. Also most users will just close the app when they intend to minimize.

This is annoying if you're downloading stuff in the background. Every time you restart the app, you have to redo initialization such as connecting to services and so on. The way to handle this in Android is to create a long running ForegroundService.

However then globals remain persistent, and miniquad will crash due to the display having been already initialized. So this commit fixes that by replacing the display if already initialized. It doesn't change existing usage of Android apps.

@not-fl3

not-fl3 commented Jun 27, 2025

Copy link
Copy Markdown
Owner

Thanks for PR!

@not-fl3 not-fl3 merged commit d225104 into not-fl3:master Jun 27, 2025
11 checks passed
@narodnik narodnik deleted the andyfix branch June 29, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants