wifip2p


How to get the deviceName of my device using wifi p2p

只谈情不闲聊 提交于 2019-12-25 06:44:57
问题 I'm developing an app based on Google's wifi p2p API and I would like to get the name of the device I'm using (not the peers) but the only way I found to retrieve the name is in case I change it by using something like this: if (WifiP2pManager.WIFI_P2P_THIS_DEVICE_CHANGED_ACTION.equals(action)) { // this device details has changed(name, connected, etc) mApp.mThisDevice = (WifiP2pDevice) intent.getParcelableExtra(WifiP2pManager.EXTRA_WIFI_P2P_DEVICE); mApp.mDeviceName = mApp.mThisDevice

How to find devices via Wi-fi peer 2 peer, that have the same app installed?

倖福魔咒の 提交于 2019-12-23 04:24:10
问题 I am quite new in the Android development. I have an app that tries to connect to other devices running android via Wi-Fi peer 2 peer. What I want to do is to see only the devices that have the same app installed rather than see all the available peers. Thanks in advance. 回答1: Yeah you can do this!! :) Try using the Wifi P2p for Service Discovery. Actually, the link is a training which teaches exactly what you want. So, what you basically want to do is create a WifiP2pDnsSdServiceInfo object

WiFi P2P network in Android Things

独自空忆成欢 提交于 2019-12-22 08:15:54
问题 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); .... } }

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); .... } }

Alternative to discovering peers with Wifi Direct as it requires both phones running WiFi Direct discovery

爷,独闯天下 提交于 2019-12-19 09:50:32
问题 I am trying to discover WiFi Direct peer to peer android devices but peers are discovered only when both phones are running WiFi Direct discovery. What I have Understood so far is, they will see each other only when they are both scanning for WiFi direct connections at the same time. This is because the way WiFi Direct works is that when phones are scanning for WiFi Direct connections, they will negotiate with the other peers for the role of Access Point or Slave device. Hence both need to

Why is discovering peers for Android Wi-Fi Direct so unreliable?

怎甘沉沦 提交于 2019-12-18 11:14:05
问题 I am experimenting with Android's Wi-Fi Direct (or P2P if you prefer). I thought it was working very nicely between my two phones, but I realized I am encountering issues with the WifiP2pManager.discoverPeers() and/or WifiP2pManager.requestPeers() . I have observed these results: No peers are discovered and no callbacks are fired for a good 1+ minute. I observe this through the Wi-Fi Direct portion of the Android Wi-Fi settings as well. This is odd because sometimes the discovery completes

Wifi P2P service discovery works intermittently

人盡茶涼 提交于 2019-12-17 21:42:15
问题 Wifi P2P service discovery is not behaving as expected. I am seeing intermittent issues where the DNSSD listeners are not called always and hence I have no clue of nearby devices running the same app. I am using the following two APIs - one to register a service to be discovered by other devices and the other to discover the nearby services running on other devices. Any idea if I am doing anything wrong here or is there some specific sequence of other android API calls that need to be made

How to auto-accept Wi-Fi Direct connection requests in Android

不问归期 提交于 2019-12-17 17:54:25
问题 I have 2 Android devices using WiFi Direct. On one device I can get information about the other device using the WifiP2pManager class, and request a connection to the other device. However when I request a connection, the other device pops up a little window and asks the user if they want to accept the connection request. Is it possible to auto-accept these connection requests? I.E to be able to connect to the other device without user confirmation? 回答1: Based on the comments, do you really

Peer-to-Peer Communication HolePunching (Android)

淺唱寂寞╮ 提交于 2019-12-13 19:50:42
问题 I am working on an app that uses peer-to-peer communication between Android devices. It receives and delivers JSON data and the data never goes through the server ever. The server is only used to keep track of user IDs, login times, IP changes, and other stuff. This app will use sockets for communication. Requirements JSON data goes directly to an Android device from another Android device without going through server. The android devices can be connected to any kind network like 3G or Wi-Fi

WIFI P2P discovery list is not getting refreshed?

南楼画角 提交于 2019-12-12 06:31:42
问题 I am working on an application where i listed all the WIFI P2P nearby devices in a list. But the problem is that it is showing that device also which wifi is disable now. It is able to detect new devices and can list in listview but not able to remove the old ones. Thanks in advance. 回答1: In the BrodcastReceiver inside WifiP2pManager.WIFI_P2P_PEERS_CHANGED_ACTION matching action call requestpeers() method and dont call inside anyother match.....also use peers.clear() [that may be ur arraylist

工具导航Map