Connect Android device to web service on Laptop - android

In my house I can connect my android device to the service in my laptop as they are both on the same network. My question is, supossing I'm going to a bar and I can connect my laptop to the wifi but not the cellphone, how can I make the cellphone reach the web service on the laptop?
I tried to create an add hoc network and connectify.me but neither worked. With Connectify.me I was able to connect to the laptop from the phone but the phone could reach the web service (maybe a filter for the free version?)
Any advice?
I've already checked this: Connect an Android Device To a Web Service on Local Host and it's not the same as my problem.
Thanks in advance! Guillermo.

I haven't tried Connectify, but Virtual Router worked for me. There are some more instructions here if you need it.

My question is, supossing I'm going to a bar and I can connect my laptop to the wifi but not the cellphone, how can I make the cellphone reach the web service on the laptop?
Most likely, you can't. The bar is unlikely to have given you a public IP address, and it unlikely that you will convince the bartender to allow you to modify their firewall to forward a port to your notebook.

Related

Android Connecting to Xamp

Good day.I am trying to connect my android application to xamp. Basically I have an application that uses xamp, it works on an emulator but not on the actual device.After hours of searching, I found solutions to use tethering on usb and wifi. With tethering I get the error "adb problem, unable to communicate with device..please kill add".With wifi, it does not access my localhost.I know that someone might say this is a broad question.What I am asking is, how can I make my device access my xamp localhost?
I just mentioned the above to show what I tried and could not succeed.
If your android device and the device running XAMPP, are both on the same network, you could just use the private IP address of the machine running XAMPP, but if they're not on the same network, then you are gonna need to do some port forwarding and maybe get a static IP address.

Connect Android device to web service in VirtualBox

i have in my laptop in virtualbox a UbuntuServer with a webservice at ip: 192.168.1.46, and webservice, ServerName is api.webservice, so from my laptop if i try in the browser api.webservice it works well!.
Now the problem, from the android device not work, the webservice,laptop and device are connect in the same network, from the device if i try in the browser 192.168.1.46, it tell me it works, but if i try api.webservice not work..
there are any solution?
Probably this is a problem with name resolution.
Your laptap (Windows?) is able to resolve "api.webservice", but your Android device not.
It highly depends on your infrastructure (WLAN-Router, DHCP-Server) how to solve this problem. You could perhaps provision your WLAN-Router/DHCP-Server to permanently bind api.webservice to the IP address of your Ubuntu box, so Android device can make a NS-lookup.
I suppose your Android app will connect a real Internet server in future. In this case, I wouldn't bother connecting the webservice by IP-address for test purposes.
When your app is published and used outside your local network, name resolution will work when connecting to a internet server registered in "official" DNS.

Connecting an Android phone to a local server w/o a third device

I know the question line is a bit ambiguous, but I could not think of a better one.
My question is:
I have an Android app that makes an HTTP request, the server is currently running on local. So, when I am in my office I connect both my laptop (on which the server is) and my phone on a same LAN network. And make that HTTP request using the hitting on the IP of the laptop.
This is all fine, I wanna know is when I reach home I don't have a WiFi running, neither do I have a third device (so that, I may use it as a WiFi Hotspot). So, is there any tool by which I can achieve this. Both the Laptop and the phone has WiFi.
You should try Connectify Me...install it in you laptop, and it will make its wifi receiver to work as wifi broadcaster...than you can connect your android deivce to this broadcasted network just as you normally do with other wifi networks.
And then hopefully you will be able to access you server hosted on laptop from you android device...

Testing app beetween real device and emulator via WiFi without router

I develop app which contains a client and a server side, so I need to test work between them. I have a real android device and I want android device to connects to emulator. I'm working at work sometimes(if I have free time of course) and at home. I have the WiFi router at home and I can connect to the real device by emulator(TCP listener running on the real device), but not vise versa(I don't know which exactly IP to use). But at work I have only hot-spot WiFi point without router. My android device connects to it fine. Even more ADB can connect to the device when adbWireless running on it. But it doesn't work, I can't connect to tcp listener in any cases. The difference between home and work is existence of WiFi router. Are there any solutions? If not why Android debug bridge(ADB) can connect to adbWireless? Thanks.
I solved the problem. I run tethering on my real device and run the server on it. Then I use a program Connection state viewer there is a link: https://play.google.com/store/apps/details?id=ru.nolesh.android.connectionstateviewer It helps me to find IP address. After that I start the emulator and the client side on it. So I connect to my server by given IP.

Debug webservice from android app in the same network

I'm developing an app for android that consumes a .NET webservice. This part is ok, I've already tested in the vm and my app does call the webservice and do what its supposed to do.
The problem is that i need to test it "live" now. As my app needs bluetooth and other stuff that the emulator can't provide I have to deploy it in my phone and try out.
The real problem is that my webservice is hosted in my computer (not in IIS). How can i connect to the webservice?
I've already set a VPN connection in my computer so that i could be in the same network. The connection was ok and i could ping my computer from my android phone (i downloaded an app for that). But i tried to call the webservice using my computer's ip and it doesn't work.
I use this address on browser: http://192.168.56.1:49365/DataUpload.asmx (where 192.168.56.1 is the ip from my computer and DataUpload.asmx is the name of the webservice)
The name of the webservice is ok and the ip too but i can't see the webservice.
Does anyone knows how to help me? I suppose is something with the port or something like that (MY FIREWALL IS DISABLED).
Thanks in advance.
Almost certainly 192.168.56.1 is your router, this is pretty much the norm. To be sure, go to your computer and use the same address in your browser there as you tried on the phone.
Post your results.
One other thing, you'll have to turn off the 'Cellular' radio in your phone to be sure it only connects via WiFi. Otherwise you'll have to find out what IP address you have at your house and point your phone at that IP and port forward from your router to your local machine.

Categories

Resources