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

cmd/ebitenmobile: the screen turns black when launching from a notification #3037

Closed
1 of 11 tasks
hajimehoshi opened this issue Jul 12, 2024 · 3 comments
Closed
1 of 11 tasks

Comments

@hajimehoshi
Copy link
Owner

hajimehoshi commented Jul 12, 2024

Ebitengine Version

9bc5ed3

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • PlayStation 5
  • Xbox
  • Web Browsers

Go Version (go version)

go version go1.22.4 darwin/arm64

What steps will reproduce the problem?

  1. Create an Android application with allowing notification
  2. Launch the application and put it background
  3. Send a test message to the application (https://firebase.google.com/docs/cloud-messaging/android/first-message)
  4. See the application running

What is the expected result?

The application runs correctly

What happens instead?

The screen blacks out

Anything else you feel useful to add?

Maybe a30f075 ?

@hajimehoshi hajimehoshi added this to the v2.7.8 milestone Jul 12, 2024
@hajimehoshi
Copy link
Owner Author

Apparently, the entire GLSurfaceView is recreated at notification.

@hajimehoshi
Copy link
Owner Author

This happens when the view is created at Activity's onCreate. We should not do that.

@hajimehoshi hajimehoshi closed this as not planned Won't fix, can't repro, duplicate, stale Jul 12, 2024
@hajimehoshi hajimehoshi removed the bug label Jul 12, 2024
@hajimehoshi hajimehoshi removed this from the v2.7.8 milestone Jul 12, 2024
@hajimehoshi
Copy link
Owner Author

Note to myself, if you want to prevent activity recreation on notification, see

https://stackoverflow.com/questions/7944338/resume-last-activity-when-launcher-icon-is-clicked

android:launchMode="singleInstance" worked in my case.

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

No branches or pull requests

1 participant