Android - How to turn off Wifi-direct
来源:互联网 发布:佐拉算法提及奇异博士 编辑:程序博客网 时间:2024/05/21 06:12
I'm kind of new to Java, Android and even Stackoverflow, sorry if my question is not well written.
I followed many guides online that showed me how to connect two devices using Wifi-direct.I managed to do this and now I just need to close the connection.
I have a C++ "server" peer and an Android "client" peer and for the client side I am using the Wifi-Direct Demo (linked below)
- I create a Wifi-Direct group C++ side
- From Android I search for servers
- The user chooses the server
- Socket connection
- Transmission
Now I don't need the connection anymore, so I want to close it and immediately reconnect both devices to the normal Wifi.
If I try to launch the disconnect() function of the demo, it enter OnSuccess(), but the Wifi-Direct icon simply won't go away;Strangely, I can't find any guide at all on how to do this.
There is also another problem with my app... If I am connected, and I close the app, the Wifi-direct icon is still on and I can't connect to Internet using Wifi... I think the socket may still be in the TIME_WAIT status, but I'm not sure on how to check this...
Thank you in advance!
EDIT: some answer that I found useful, but do not show how to turn off Wifi-Direct:
http://processors.wiki.ti.com/index.php/OMAP_Wireless_Connectivity_NLCP_WiFi_Direct_Configuration_Scripts#p2p_group_add
https://android.googlesource.com/platform/development/+/master/samples/WiFiDirectDemo/
Wifi Direct Android
how to create the server & client connection between android mobile and PC
上一篇:Wi-Fi Direct
下一篇:Android Tutorial Android Wifi-Direct Tutorial
- Android之开发环境搭建
- Android自定义View的实现...
- AndroidManifest.xml配置文件...
- Android相对布局+圆角按钮+Sha...
- 查看Android应用包名package和...
- linux dhcp peizhi roc
- 关于Unix文件的软链接
- 求教这个命令什么意思,我是新...
- sed -e "/grep/d" 是什么意思...
- 谁能够帮我解决LINUX 2.6 10...
- Android - How to turn off Wifi-direct
- How to turn off Wifi via ADB
- How to turn off the Javadoc hover
- How to turn off checksum offload?
- How to Turn Off / Disable AutoComplete – ASP .Net
- How to Turn Off Shape Protection in Visio
- How to Turn Off Form Autocompletion FireFox下表单无法刷新重置的解决
- How to Disable and Turn Off UAC …
- 禁掉Apache web server签名 How to turn off server signature on Apache web server
- When to turn TCP SACK off?
- Android: WiFi direct
- Android wifi direct
- Android Wifi Direct
- Pulling Memory off an Android Device How To!
- wifi direct (wifi peer to peer)
- android 4.0 wifi direct 移植.
- Android Wifi Direct Doc Refer
- Android -wifi 直连(wifi direct )
- 线程间的通信
- fgets和gets的区别
- Wi-Fi Direct: what it is and why you should care
- iOS 快速获取屏幕截图的方法
- Wi-Fi Direct
- Android - How to turn off Wifi-direct
- Android Tutorial Android Wifi-Direct Tutorial
- Nginx、LVS、HAProxy负载均衡软件的优缺点
- wifi direct—深入理解Wi-Fi P2P
- ADPCM-PCM 的压缩
- 《深入理解Android:Wi-Fi,NFC和GPS》—android源码下载
- 国产CPU迷局 龙芯该如何参与市场竞争
- Wi-Fi Direct技术
- UUID生成方法总结