i want to make a modification to my project and right now the project status is..... it is searches the available WiFi networks and shows the list with info of the network this works properly.Now i want to search and see the details of the devices connected to the network. Is there any way to find these devices ? Your comment will be useful for me, Thanks.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
You can loop over the IP ranges, and "ping" them. It is not the best / fastest method (UDP is better) but, it works in many cases. The sample code below returns the list of the IP addresses connected to the current network.
Would you like to discover a specific device ? Or you need the list of all connected devices? The second I don't think is possible.
EDIT
Discovering specific devices:
Using
UDP Broadcast
. Some reference can be found here!There are some protocols that are supported by some devices( routers, HDD, etc...), like UPNP!
If you develop a software on the device which you would like to discover you could create a
UDP
server listening on a specific port. Your client will just send abroadcast
message on that port and yourServer
will send a response with the information you need. Here it is a simple example.