Is there any way to get what the user is listening to?

1

I would like to know if you have some way or even a lib so that I can get the information of the audio player of the phone, such as song duration, name, album etc. with the react native.

    
asked by anonymous 02.01.2018 / 19:27

1 answer

1

iOS and Android applications can not access data or memory from one another, and reading the output mechanisms of the devices is very limited. You will not be able to make an application that can pick up audio from the device or from other applications. These limitations are by design, to prevent invasion of privacy.

The only way to get what the user is listening for is to use the APIs of the sound-reproducing applications. With Spotify, for example, the iOS and Android APIs will not help you, but the Web API lets you see the last song the user listened to . You may be lucky to be the song that the user is listening to at the time of your appointment, but there are no warranties.

Each different application will be a different world to explore. Good luck.

    
02.01.2018 / 19:41