How to check if a bluetooth headphone is connected?

I have an application which requires to check if a bluetooth headphone is connected to the device. I tried using bluetooth client, server and admin but nothing seems to have worked out. Bluetooth.is_connected gives back an empty list even when my bluetooth headphone is connected. My headphone is made by Sony. I really want a solution to this problem. Any help is appreciated.

What have you tried so far?

i tried using the bluetooth client and server config. But is_connected block returned an empty list

Taifun’s Bluetooth extension may help. Of course, it can not recognise if the paired device is a headphone.

Nope, it didn’t

You didn’t open the link

what do you mean?

I mean this link

i did open the link.