First off apologies if you got multiple posts from me.  My mail client 
threw a fit!

You can get this to work without a proxy.  I will assume you are running 
a dhcp server.  If so just make sure it serves up your internal dns.  
Your internal dns obviously should forward any requests it doesn't know 
about out to the internet.

In our dhcpd.conf we have the line:
option domain-name-servers 192.168.77.2;

So when a request for an ip comes from a device ( pc / phone etc ) it 
will also get your dns information.
If you are not providing a dns service to the internet then its a little 
easier as we can avoid internal and external views.  The simplest way is 
to add the host name of your pc in the dns.  Remember to restart the 
server services.


Best regards,

Phil.


David Turner wrote:
> As I said, the emulated system must speak to a real DNS server, so it 
> can't access the HOSTS/resolv.conf on your machine.
> When it starts, the emulator tries to find the current DNS servers for 
> your machine, and setups network aliases so that the
> Android system can send query to them.
>
> However, a typical Windows/Unix application also resolves machine 
> names with the help of local configuration files
> (e.g. /etc/hosts and etc/resolv.conf on Unix), which don't involve a 
> DNS server.
>
> What you need is run a DNS proxy program on your machine, and make the 
> emulator use it by default (with the -dns-server option).
> your DNS proxy should be able to use the hosts/resolv.conf file and 
> resolve internal names.
>
> On Fri, Dec 19, 2008 at 11:22 AM, Christian Wiesbauer 
> <christian.wiesba...@bdc.at <mailto:christian.wiesba...@bdc.at>> wrote:
>
>
>     Yes, I'm using an internal dns? Is that a problem?
>
>     Best regards,
>     Christian Wiesbauer
>
>     -----Ursprüngliche Nachricht-----
>     Von: android-developers@googlegroups.com
>     <mailto:android-developers@googlegroups.com>
>     [mailto:android-developers@googlegroups.com
>     <mailto:android-developers@googlegroups.com>] Im Auftrag von
>     lotusscript
>     Gesendet: Freitag, 19. Dezember 2008 11:17
>     An: android-developers@googlegroups.com
>     <mailto:android-developers@googlegroups.com>
>     Betreff: [android-developers] Re: android dns problems
>
>
>     Do you run an internal dns? Tested here in the emulator and actual
>     device without problems.
>
>
>     Best regards,
>
>     Phil.
>
>
>
>     Christian Wiesbauer wrote:
>     >
>     > Hi,
>     >
>     > I'm trying to make a connection with one of the hosts in my network
>     > with following code:
>     >
>     > URL aURL = new URL(http://<hostname>:<port>/<path>);
>     >
>     > URLConnection conn = aURL.openConnection();
>     >
>     > conn.connect();
>     >
>     > If I use the IP address of the host everything works fine but if I
>     > change it to the hostname I get an "UnknownHostException: Host is
>     > unresolved: <hostname>:<port>". This only happens if I use internal
>     > hostnames, external hostnames like google.com
>     <http://google.com> work!
>     >
>     > Does anybody have a solution for this problem?
>     >
>     > Best regards,
>     >
>     > Christian Wiesbauer
>     >
>     >
>     > >
>
>
>
>
>
>
>
> >


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

Reply via email to