Android Question Android TV remote bluetooth data

layman

Member
Hi
I have an Android TV with Bluetooth remote. I want to sniff the data sent when a particular button is pressed. I couldn't find anything on bluetooth data sniffing akin to BLE code in forum. Could someone point in the right direction ?
 

aidymp

Well-Known Member
Licensed User
Longtime User
Or you could just log the keypress! in your own app, I do so i know what keys do what!
 
Upvote 0

aidymp

Well-Known Member
Licensed User
Longtime User
Your question is a little vauge, You said you wanted to see what data is sent when you press a remote button. The data would actually be a keypress! eg on the fire tv the back button is keycode.back its simple to log all the keypresses just by pressing the remote buttons and logging the keycode.
 
Upvote 0

layman

Member
Your question is a little vauge, You said you wanted to see what data is sent when you press a remote button. The data would actually be a keypress! eg on the fire tv the back button is keycode.back its simple to log all the keypresses just by pressing the remote buttons and logging the keycode.
Unfortunately for me Basic4Android is still new so this task isn't simple. Could you kindly put up code snippet for logging key press from bluetooth remote ?
 
Upvote 0

aidymp

Well-Known Member
Licensed User
Longtime User
Unfortunately for me Basic4Android is still new so this task isn't simple. Could you kindly put up code snippet for logging key press from bluetooth remote ?

Just add the code Erel posted at the end of your existing code, run your application on the TV, press a button on the bluyetooth remote and it will show the keycode in the log.
 
Upvote 0
Top