tags:

views:

27

answers:

1

Hi

From my android code I try with the android browser to access a tomcat service running on my computer like this :

 Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://localhost:8080/615734.apk"));
 startActivity(myIntent);

Unfortunately all I get is "page unavailable" . What should I do to be able to have this running ?

+1  A: 

"localhost" may either not be supported on Android or may refer to the device itself. I'm not sure. Anyway it doesn't surprise me it doesn't work.

Work out the LAN IP of your workstation (192.168.0.something probably) and replace "localhost" with this.

Jim Blackler