How to verify status of Wifi ,Data ,Location, Bluetooth in android

Hi Guys

I know how to change status of WIFI ,Data ,Location, Bluetooth to ON\OFF in android with ADB shell
how I can check status before ?

for example:
if WIFI is ON ,so I send disable , And if its OFF so I send enable

Thanks :slight_smile:

same adb

adb shell dumpsys wifi | grep "Wi-Fi is"
Wi-Fi is enabled

Your answer is unclear
How do I query using JAVA code?
Is it active or inactive?

Thanks :slight_smile:

I think I found a solution without checking before the communication status
Just send the command to activate, if it is activated then nothing happens
And if not activated, then it does activate

see e.g.

Wi-Fi is enabled = WiFi enabled on phone.

1 Like