Android Question Read bluetooht keyboard mode device in a service


Active Member
Licensed User
Longtime User
Hi everyone
I have this remote control
Bluetooth 4 compatible from Android version 4.3
works properly is seen as text entry.
I need to interface when the app is not first,
if possible by the starter service,
how can I do it, even using JavaObject or some library?
I tried with the BlueTooth library it finds it, but it doesn't connect in serial emulation.
I should understand how to read the keys eg volume + volume minus pause in a service.
I hope I was well versed.
Thank you

I found this
does anyone help me convert it?

<receiver android:name=".RemoteControlReceiver">
        <action android:name="android.intent.action.MEDIA_BUTTON" />

public class RemoteControlReceiver extends BroadcastReceiver {
    public void onReceive(Context context, Intent intent) {
        if (Intent.ACTION_MEDIA_BUTTON.equals(intent.getAction())) {
            KeyEvent event = (KeyEvent)intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT);
            if (KeyEvent.KEYCODE_VOLUME_DOWN == event.getKeyCode()) {
                // Handle key press.
Last edited: