android - Issue about connecting with wifidirect? -
i wanna create application using wifi direct.
in connecting step between 2 devices. wanna set wifi direct on if wifi direct state of device use application off. can change wifi direct state of device(mobile)? how?
when send request connect devices can application auto accept request without asking device received request?
please support me. much!!!
the answer yes, can turn on/off wifi connection of handset using wifimanager:
wifimanager wifimanager = (wifimanager) getsystemservice(context.wifi_service); wifimanager.setwifienabled(true);
wifi , wifidirect enabled @ same time. need add needed permissions android manifest.
check android developers more information on "http://developer.android.com/reference/android/net/wifi/wifimanager.html#setwifienabled(boolean)".
about accepting connection without human interaction... should possible, if app 1 handling connection @ end-side , have developed in way take care of steps. not end-user perspective since not giving him power of decision. nice solution doing manually , allowing user decide if allow automatically next time specific device.
please, provide feedback if not clear or not answers questions.
Comments
Post a Comment