質問

I am developing an Android app that does some network testing and am in need of getting DNS and gateway addresses. Before now, we could use DhcpInfo but now Google's developer page says that class is deprecated. Since this is a new application I want to develop for the future and the DhcpInfo developer's page also says to use LinkProperties. I have not been able to find anything relating to this class anywhere on their developer's pages. Am I missing something or is there not a replacement class for DhcpInfo yet?

DhcpInfo Developer's Page

役に立ちましたか?

解決

I can't tell you the story behind the missing LinkProperties, but I can tell you that it is likely safe to continue using DhcpInfo until a suitable replacement is provided.

Even though DhcpInfo is deprecated, it will almost certainly continue working for the foreseeable future, and you clearly cannot replace it with LinkProperties yet.

There is a similar issue in the AOSP issue tracker, though you may want to open a new ticket for the entire DhcpInfo class.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top