1

如何让我的 android 应用程序获取我的 php 服务器的 IP 地址?

例如,android 应用程序发送广播消息。然后我的服务器侦听该消息并将服务器的 ip 地址发送到 android 应用程序。

Phone ----> Send broadcast message for requesting IP Address
Server <----- Receive the message
Server -----> Send the IP Address information to phone
Phone <---- Receive the information and save the server's IP Address. Finish

我找到了 JmDNS,但是我的服务器是 PHP 而不是 Java。或者,有一个技巧或解决方案来完成这项工作?

4

0 回答 0