如何在Android上以编程方式从Mac地址获取IP地址? [英] How to get an IP address from Mac address programmatically on Android?

查看:248
本文介绍了如何在Android上以编程方式从Mac地址获取IP地址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过编程,我从同一网络上的设备获得了其他启用Wifi的设备的Mac地址.同样,我需要在这里申请.通过使用Android上的Mac地址,是否有任何应用程序或任何其他可能性来获取网络上每个启用WiFi的设备的IP地址?

Programmatically, I got Mac addresses of other Wifi enabled devices from my device on the same network. Same I need to apply here. Is there any apps or any other possibilities to get an IP addresses of each wifi enabled devices on the network by using those Mac addresses on Android?

推荐答案

如果您正在寻找一个Android应用,则可以尝试

If you're looking for an android app, you could try Network Discovery which work very well and can list all the devices on your local network with the corresponding IP and address.

如果您正在寻找代码,那么该应用程序可以在github上除其他事项外)基本上与Yahel解释的内容相同:它读为/proc/net/arp.

If you're looking for code instead, well the application is available on github and does (amongst other things ) basically the same thing than explained by Yahel : it reads /proc/net/arp .

注意:我不是此应用程序的作者.

Note : I'm NOT the author of this application.

这篇关于如何在Android上以编程方式从Mac地址获取IP地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆