Differentiate RemoteControlClient from the headset

When users quickly press the play / pause button on their headsets, I have a code to detect this and automatically skip to the next song. Unfortunately, it seems that when using RemoteControlClient it uses the same PLAY_PAUSE event. If you accidentally double-click on a pause screen lock (or, most often, double-click on the Android Wear display to try to get it to respond), then moves on to the next song. I just want this to happen on bluetooth headsets. Is there a way to distinguish between two?

+5
source share
1 answer

I would prefer you to go through https://developer.android.com/sdk/api_diff/19/changes.html

Of course, this will help you a lot.

-1
source

Source: https://habr.com/ru/post/1201758/


All Articles