Go Back   Android Forums > Android Discussion > Android Applications
Android Applications All the information you could ever want about Android Applications. Learn about apps and get help with them... all here! New apps can be found and announced in the Applications Announcements forum linked below.

test: Reply
 
LinkBack Thread Tools
Old November 16th, 2010, 07:54 AM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Nov 2010
Posts: 7
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default mobile, how to access to local server

Hi everybody, in a first step, sorry for my english -_-'.
I'm developping an android application. This application use a web service
to get some informations. The web service is deployed on local in my computer. When i run my app with the android emulator, everything is ok.
The emulator use the address 10.0.2.2 to use the local web service.

Now i would like to know if it's possible to connect my mobile phone to my computer and to have access to my local web service.In others words, use my own mobile phone instead of the emulator.

Thanks in advance

Advertisements
nokachouik is offline  
Reply With Quote
sponsored links
Old November 16th, 2010, 08:58 AM   #2 (permalink)
Member
 
Join Date: Apr 2010
Posts: 102
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 17 Times in 13 Posts
Default

Yes, there are two ways to go about this:

1) If you only want to do it for testing purposes the safest and easiest way is to connect your phone to a local wireless network that also has your "server" component. You'll utilize the same 10. internal address for access to the web service.

2) Make your local computer accessible via the internet. The way to do this is entirely dependent on your home internet connection and how it's configured. You'll need to open up any local firewall(s) to allow external access to the PC and if you're behind a router you will need to configure the correct NAT rules on your router to allow access. You'll also need to figure out what your external IP address is (if your local machine is directly connected it's straightforward, but if you're behind a router you should be able to find that info in your router's config page).

If you have any other questions feel free to ask
dawankler is offline  
Reply With Quote
Old November 16th, 2010, 09:13 AM   #3 (permalink)
New Member
Thread Author (OP)
 
Join Date: Nov 2010
Posts: 7
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your answers.
The problem is that i cannot make my local computer accessible via the internet and i cannot use the wifi.
Is there any other method to do this only with cable?
nokachouik is offline  
Reply With Quote
Old November 16th, 2010, 10:20 AM   #4 (permalink)
 
Join Date: Apr 2010
Posts: 5,867
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 634 Times in 538 Posts
Default

Quote:
Originally Posted by nokachouik View Post
Thanks for your answers.
The problem is that i cannot make my local computer accessible via the internet and i cannot use the wifi.
Is there any other method to do this only with cable?
not really. You need to be able to access the computer via wifi or through the internet.
sitlet is offline  
Reply With Quote
Old November 16th, 2010, 10:25 AM   #5 (permalink)
New Member
Thread Author (OP)
 
Join Date: Nov 2010
Posts: 7
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok i see.
So i will choose one of your solutions.

Thank you
nokachouik is offline  
Reply With Quote
Old March 7th, 2012, 04:02 PM   #6 (permalink)
New Member
 
Join Date: Mar 2012
Posts: 1
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey i also need the same information.Please can u be more clear and detailed about the first option.What do u mean by having my server as a component in the local network ? Do u mean an adhoc n/w? i tried that but the mobile doesnt seem to detect it at all .
mohdraes is offline  
Reply With Quote
Reply


Go Back   Android Forums > Android Discussion > Android Applications
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 02:12 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.