There is not an API yet to get this info.  You can inspect system
properties and use net.dns1 and net.dns2,  but that's an internal
implementation detail that may/will change in the future.

R

On Tue, Jun 5, 2012 at 3:06 AM, Michael Leung <[email protected]>wrote:

> Thanks!
>
> Regards,
> Michael
> http://www.itblogs.info
> http://www.michaelleumg.info
>  2012-6-5 下午4:17 於 "David Olsson" <[email protected]> 寫道:
>
> 3G? Wifi? Did you try google?
>>
>> I googled for like 1 minute,
>> http://stackoverflow.com/questions/249916/how-do-i-find-the-dns-servers-in-android-from-a-java-program
>> https://groups.google.com/forum/?fromgroups#!topic/android-ndk/6eogJcaOPOg
>>
>>
>>
>>
>> On Tue, Jun 5, 2012 at 7:43 AM, Michael Leung <[email protected]>wrote:
>>
>>>
>>> Hi all,
>>>   Is it possible to get the DNS server setting from app? I think that is
>>> possible to find out by reading the config in a rooted android.
>>> But how 's about the normal android phone?
>>>  --
>>> Regards,
>>> Michael Leung
>>> http://www.itblogs.info - My IT Blog
>>> http://diary.skynovel.info - My Blog
>>> http://www.michaelleung.info - My Homepage
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to