-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
clearNowPlayingMetadata clears metadata, but never comes back #1653
Comments
Possibly related to #1719? |
The code for the Queue button in the example app is:
So I don't think we can expect this to do anything 😉 |
@gavrichards ahh... Nice catch! @DennisdeWitNL , @gavrichards is correct, that button in the example app currently doesn't do anything. Can you update your reproduction steps to outline how to repro? |
@jspizziri It's over here. |
@jspizziri I can confirm the described behaviour is correct - no matter what you do, the metadata doesn't come back once it has been cleared. Even calling |
I can fix this, but I am wondering what @DennisdeWitNL what do you expect from this functionality and why do you need it? Is it supposed to set all the metadata fields to empty string? Should it remove the notification? (in which case, why would you want to?) |
To be fair, I don’t need this function anymore. I have replaced it with the StoppedPlaybackAndRemoveNotification updateOption. |
Does anyone have a use for this functionality? Otherwise I would probably just nominate it for removal... |
@gavrichards Do you know of a use case for this? |
@jspizziri I don't use it in our codebase. Our app is for live radio stations, and their "on demand" content. For live radio, when a track is playing we show that, and when a track is no longer playing we update the metadata to show the programme/host who is currently on air, or the station name/logo. So we never have a need to clear it completely. |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Deprecated this functionality in the following pull request: #1909 |
@puckey We are on version 3.2 and use clearNowPlayingMetadata method to remove the track player from the notifications tray. See here for more context: Are you sure you want to deprecate this method? If so, how will we clear the track player from the notification tray? Since calling reset does not clear it from the tray. |
@watadarkstar Could you make a feature request for this functionality? I guess the api would need to be something like |
Ok I created the feature request #2415 |
Describe the Bug
After clearing the now playing metadata by clearNowPlayingMetadata, every new track added, will not show the metadata anymore, unless you fully restart the app after forcing the app to stop. This is an Android issue.
Steps To Reproduce
Code To Reproduce
Please download my edited example here: https://github.com/DennisdeWitNL/example-clearmetadata
Environment Info:
Paste the results of
npx react-native info
Paste the exact
react-native-track-player
version you are using[email protected]
Real device? Or simulator?
Both
What OS are you running?
macOS Ventura with Android Studio, the latest SDK. Also fails on a Samsung Galaxy S10 Ultra
How I can Help
What can you do to help resolve this?
Have you investigated the underlying JS or Swift/Android code causing this bug?
Can you create a Pull Request with a fix?
There is no log in Logcat, therefore I don't know where to start. Willing to test a PR of course!
The text was updated successfully, but these errors were encountered: