fast4x / RiMusic

A multilingual Android application for streaming music from YouTube Music.
https://rimusic.xyz
GNU General Public License v3.0
1.98k stars 100 forks source link

[Feature]: Play intent handling. #3442

Open vjbazhenov opened 2 weeks ago

vjbazhenov commented 2 weeks ago

Description

Add Play intent handling feature please.

Suggested Solution

Hello. It would be nice if your app could handle Play intent so that another app would be able to start play control on your app playback.

Alternatives

No response

Additional Context

No response

fast4x commented 2 weeks ago

Give me an example please.

vjbazhenov commented 1 week ago

Thank you for reply. In order to add this feature to your app it should be able to receive and handle Intent.ACTION_MEDIA_BUTTON broadcasts.Properly handle the "Play" key event within the BroadcastReceiver.The app should be able to parse the intent and trigger music playback in response to it. There is an app in a Huawei App gallery which is called BluetoothMusicLauncher. I am not sure I am allowed to post link on it here. That app controls media play action in music apps once one is connected to preferred Bluetooth device. It could be nice if your app would compatible with that app.

Give me an example please.

fast4x commented 1 week ago

Actually media button is handled but media controls isn't exported. Would be this the cause of why external app can't manage player. I can try to export media controls and you can try. What do you think?

vjbazhenov commented 1 week ago

That makes sense. Sure, I will try.