WiFi P2P network in Android Things

耗尽温柔 提交于 2019-12-22 08:15:04

问题


I would like to create a P2P WiFi network using Android Things (5.1) and a couple of Raspberry Pi 3 or alternatively using Bluetooth. I followed the guide in the Android Developer section https://developer.android.com/guide/topics/connectivity/wifip2p.html, so my MainActivity looks like:

private class MainActtivity { private WifiP2pManager mManager; .... @Override public void onCreate(Bundle savedInstances) { mManager = (WifiP2pManager) getSystemService(Context.WIFI_P2P_SERVICE); .... } }

However when I try to run the app, with WiFI enabled, the SystemServiceRegistry shows a message stating

No service published for: wifip2p
and the WifiP2pManager is not retrieved.

How can I solve this issue? Does anybody know if it is possible to create a WiFi P2P network using WiFi Direct and Android Things?


回答1:


As of now (Android things stable release 1.0) WifiP2P is not supported on RPI3B,Hence try to use Google NearBy 2.0 API as alternative I think it will satisfy your need.



来源:https://stackoverflow.com/questions/47547864/wifi-p2p-network-in-android-things

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!