Android Question Turn Wifi Direct On/Off programmatically

William Hunter

Active Member
Licensed User
Longtime User
Is there any way to turn Wifi Direct On/Off Programmatically?

Best regards :)
 

William Hunter

Active Member
Licensed User
Longtime User
If wifi is on then wifi direct is also available.
This may be the case with more current versions of Android, but not all. I have two Samsung devices. One runs Android v-4.1.2, while the other v-4.0.4. Version 4.1.2 handles WIFI Direct as you say. But version 4.0.4 requires that a WIFI Direct slider, in wifi settings, be manually set to on. When this is done WIFI Client/Hotspot is then turned off.

I have found using WIFI Direct between these two devices to be quite flaky. Sometimes connections and file transfers are made with ease. At other times it’s impossible to make a connection at all. There is another problem I have found with v-4.0.4, in that it is impossible to use USB Debugging. The USB connection is made, but B4A cannot connect for debugging as no connected device is detected.

I think I will have to put this project on the back burner, until I replace the v-4.0.4 device with something newer.

Best regards
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top