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

Controls not destroyed when app is closed #13

Closed
ingageco opened this issue Jun 21, 2023 · 7 comments
Closed

Controls not destroyed when app is closed #13

ingageco opened this issue Jun 21, 2023 · 7 comments

Comments

@ingageco
Copy link
Owner

ingageco commented Jun 21, 2023

One observation with the android-13-style branch of this plugin is that the controls are not destroyed when closing the application. This happens in 2 instances:

A.

  • Open your application
  • Play some music for some time (media controls are created)
  • Close the application
    ==> The media controls persist.

B.

  • Open the application
  • Play some music and stop the music (media controls are created, no active streams)
  • Put the application to the background
  • Wait for e.g. 15 minutes
    ==> The system will close the application, but the media controls are still visible.

This reproduces on Android 12 as well as 13.

Originally posted by @NorthFred in #11 (comment)

@ingageco
Copy link
Owner Author

@NorthFred Can you update and see if you still get this behavior?

@NorthFred
Copy link

NorthFred commented Jun 22, 2023

@ingageco The situation has improved. When the music is playing and the application is closed, then the music controls are dismissed as well. However, when the music is stopped and the application is closed, the media controls remain visible.
So strangely enough, it works as long as music is playing... (same for Android 12 and 13).

@NorthFred
Copy link

@ingageco Also, I think I am ready to start using this in production - there are no showstoppers at least. Are you ready to merge android-13-style branch to the main branch?

@ingageco
Copy link
Owner Author

@ingageco The situation has improved. When the music is playing and the application is closed, then the music controls are dismissed as well. However, when the music is stopped and the application is closed, the media controls remain visible. So strangely enough, it works as long as music is playing... (same for Android 12 and 13).

I get the same experience when the music is paused and app is closed. I just need to figure out how to detect this and why it is different from when the music is playing.

I'll merge asap!

@ingageco
Copy link
Owner Author

@NorthFred shipped to NPM / main branch as 1.1.0. prob should have done it as a 2.0 just bc of breaking changes.

BUT - i was able to hook into the app lifecycle and kill the notification. Check 1.1.0 and see if the one unresolved issue you had is now resolved.

Again - having a baby tomorrow, so you may not hear back for a bit - but thank you!

@NorthFred
Copy link

@ingageco Thank you for everything! Issue is now resolved and verified. I will release my apps to production and keep an eye on the crash logs. I'm so happy this plugin is now up-to-date for API level 33.
Wishing you and your family all the best!

@NorthFred
Copy link

@ingageco You can close this one - I am not able to do it...

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

No branches or pull requests

2 participants