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

Just a suggestion (recognize the song while they are playing from the phone) #224

Closed
soodsid opened this issue Feb 1, 2024 · 5 comments
Closed

Comments

@soodsid
Copy link

soodsid commented Feb 1, 2024

I know this is an online issue in which you are not able to recognize a song which are playing from your own phone

I have created a workaround for this. You would need to install an app called automate and as soon as any media is playing or any song is playing, you can use the ambient mode API to trigger an online search for the song(online search can still work while music is playing). In this way you will be able to search for a song as soon as it will start playing from your phone and it will show up in your now playing history.

https://llamalab.com/automate/community/flows/47360

@KieronQuinn
Copy link
Owner

You can already start an online recognition from in the app, you don't need to use Automate for that. Recognition will continue with the app minimised.

@soodsid
Copy link
Author

soodsid commented Feb 1, 2024

This just makes it automatic. For the people who dont want go in the app for every song you play and recognise it. This will recognise each song/media automatically and put it in now playing history.

@KieronQuinn
Copy link
Owner

Understood. Any sort of automation of the online recognition will never be added to the app because it introduces sending audio to Google without user interaction.

@megapro17
Copy link

This shit isn't working at all. Firstly it will only trigger if you play a music file making this automation mostly useless because it's a very rare situation when you're playing a music file from your phone without a name.

This block only works with media players using the official Android API for exposing media controls, usually show on the lock screen.

Secondly I tried modifying it and the app doesn't give any sign if intent is even working or if the token is invalid, no trace in logcat even with advanced logging

cls | adb logcat -c | adb logcat | select-string "AmbientMusic"

adb shell am broadcast -a com.kieronquinn.app.ambientmusicmod.action.RUN_RECOGNITION -e token sEftxJlHFGncvoQCUwg9hA

@KieronQuinn
Copy link
Owner

This shit isn't working at all. Firstly it will only trigger if you play a music file making this automation mostly useless because it's a very rare situation when you're playing a music file from your phone without a name.

This block only works with media players using the official Android API for exposing media controls, usually show on the lock screen.

Secondly I tried modifying it and the app doesn't give any sign if intent is even working or if the token is invalid, no trace in logcat even with advanced logging

cls | adb logcat -c | adb logcat | select-string "AmbientMusic"

adb shell am broadcast -a com.kieronquinn.app.ambientmusicmod.action.RUN_RECOGNITION -e token sEftxJlHFGncvoQCUwg9hA

Now Playing is not intended to recognise music playing on the device. It is for recognising music playing from elsewhere.

There being no indication of the token being valid is intentional as a security feature. It is your responsibility to make sure it is when running the intent.

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

3 participants