I am developing an application which retrieve the information about Bluetooth device of the android application. Following this link to know if central or peripheral mode is supported by the phone. But need to get information that which mode is device using currently?
Asked
Active
Viewed 55 times
1
-
2Do you want to know which mode your own app uses or any app on your phone? – Michael Kotzjan Aug 17 '22 at 05:40
-
wanna know about my own app. – qasim butt Aug 17 '22 at 09:13
-
1What stops you from keeping track of your app by yourself? Maybe you could store the current mode in a variable whenever you switch from central to peripheral or even to simultaneous central&peripheral. – Michael Kotzjan Aug 17 '22 at 09:35
-
can you please refer any method to obtain the current mode's value? – qasim butt Aug 17 '22 at 09:40
-
I don't know if such a method exists. I thought you would see whether you used a central or peripheral connection in your own code – Michael Kotzjan Aug 17 '22 at 09:45
-
@MichaelKotzjan thank you fro your response. I will check if I get any solution about that. Do you have any information to obtain the mode being used by bluetooth app or any other app? – qasim butt Aug 17 '22 at 09:51
-
Somewhere in your app, you started listening to advertisements of your BLE device. This means you are in central mode. If you started to advertise instead you are in peripheral mode. It is also possible that you're doing both simultaneously. – Michael Kotzjan Aug 17 '22 at 10:00