• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing webapp from android browser

 
adeeb alexander
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.

I have a web application which is right now working fine. Now my client want to access it from an android device. I tried giving this url in android browser which I normally do in pc "192.168.1.3:8080" now I cant even see the default page of tomcat. I am using tomcat 7.x.

After that I started to search and found this 10.0.2.2 and emulator stuff. To be frank I dint understand those. How could someone give a different url when my ip is something else.

I don't know android development but I am quite good in java. Now i am confused, do I need to write the full app again. Please, someone tell me a simple solution.



Thanks and Regards.
Adeeb
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has nothing at all to do with Android, but with how the web and networking works. The 192.168.n.n addresses are local to the current LAN.
 
adeeb alexander
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear.



I would just like to know that, do i need to rewrite the code so that it should work on android browser. I got this doubt because i am unable to connect to tomcat as I usually do from other pc on LAN. Can you please give an example of sample url?


Thanks.
Adeeb
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Re-read my reply. This has nothing to do with Android, why would the app need to be rewritten?

If you want to access the web app from outside the LAN, it needs a to be addressed by its WAN IP, not the LAN IP.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Expose your server to the internet and have the android device access that IP instead of the IP that is only recognized on a LAN.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic