Android Question which mp3 file is currently playing

pucki

Active Member
Licensed User
I have the following problem and not even the slightest idea for the solution.

I would like to categorize my songs that I hear on my cell phone while listening to them, or sort out bad ones.

The following is thought.

My app should recognize the title of the song (which can be taken from the file name or the ID3 tag, that doesn't matter) that is currently being played and process this information.

I know how I process the information. My problem is. How can I read out the information AUTOMATICALLY by pressing a button in my app?

It is completely sufficient if he reads out the information on my lock screen, e.g. is shown. Of course, the more information, the better. ;) Use should be like that. Music is playing in the background. When I tap the button, the info is read out and saved by me. So that is also clear. I don't want to write my own player. That would be beyond my ability for many reasons. The current player uses e.g. Techniques that go far beyond my capabilities. (e.g. automatic volume increase above the set value of the Mp3). Etc.

So to the mega-experts here, I hope you can help me.

greeting

Pucki

Ps.: I posted the same post in the German part of the forum because my English is bad.

pps: This text was translated with Google. I can read English, but the texts I write are really bad. Sorry :(
 

kimstudio

Member
This is a cool idea and I can imagine this user scenario. Not sure if it is possible as I am not familiar with Android system level programming but some of my thoughts:
  • as you mentioned: use a service to periodically capture the screen and extract the part ROI of the player, do OCR to get music information and compare with your mp3 file lists
  • a service uses file observer to monitor file access of mp3 files by the player app, if API and permission supports
  • record part of current playing music and do music recognition from certain online music DB identification service
  • hijack audio IO by making a transparent audio driver and get raw music content to do music recognition
 
Upvote 0
Top