Simplecv and Android app - android

I want to make an android app that makes beautiful effects on images using SimpleCV. I found this app http://github.com/victsou/simplecv-mobile-camera
I have windows, and I have installed tornado in my laptop. when I try to test the app on my android device, the app is not working although I ran the server and I changed the ip address in the app and the server code to my local ip address.
http://192.168.1.146:8000
The phone and computer are connected to the same network, but the router was not connected to the internet. Also, I tried to connect to the internet and use my public IP address, and it did not work. Can you help me to know why it s not working,please? Thank you so much.

As Xamox answered,the server was not working because of the firewall. After I disabled the firewall, it worked.

Related

My android phone does not connect to my apache local server

I'm developing an android app that connect with a restful web service which is on my tomcat local server.
The app works well on the emulator, however, it doesn't work on my real mobile.
I use the IP from ipconfig, and both my laptop and my phone connected to the same Wi-Fi.
I tried to call the web service from the mobile browser but still, it doesn't see my localhost :(!
it shows me :
This site cannot be reached.
I searched a lot and all the solutions say that I have to connect both to the same Wi-Fi network and to use the IP from ipconfig command, which I did!
How can I fix this?
PS: I'm using 9090 as my port number, I don't know if that a reason?
Thank you.

How to connect to a local server using windows hosted network

I am programming an Android app which connects to a TCP server running on my computer using sockets. This works perfectly fine as long as both my computer and my smartphone are connected to the Wi-Fi of my router.
I want it to also work when my computer and my phone are not connected to the Wi-Fi. Therefore I configured a Wi-Fi hotspot using hosted network on my computer. My smartphone recognizes the Wi-Fi and is able to connect to it. But now my app can't connect to the server running on my PC although I changed the code to the new IP that I got by using ipconfig on my PC.
I downloaded an app named "Fing" from the Google play store. The app shows all devices in a network. It does show my computer under the right IP address. I don't understand why my app can't connect to the server running on the PC.
On the one hand, I don't think that the problem is in the app's code, because it works on the router's Wi-Fi network. On the other hand, I doesn't seem to be a setup mistake either, because Fing is detecting my PC.
Do you have any ideas what the problem might be, or any other solution for my needs?
I actually wrote the TCP server myself using c#. I configured the Server to listen to all of my computers networkinterfaces usingIPAdress.IPv6Any. I also did configure it as dual mode socket so it can accept ipv4 and ipv6 connections. I will post the code when i am back home. So the TCP server also looks ok to me.

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.

Access a Tomcat local server using android device

I have a Tomcat server running on Localhost. My app can access it in the emulator using 10.0.0.2:8080. But when I connect a device it can't access the server.
I've seen some similar questions but couldn't get this working. can someone give me the steps on what to do?
we use 10.0.2.2:8081 because 127.0.0.1 is reserved for the emulator, however, when you need to try the application through a real device you need to change the URL to your PC IP
go to CMD and run ipconfig, look for IPv4 address, this IP you will use it..
add it to the URL for example: http://192.somethin.somthin.somthing:8081/the-location.php
P.S: you should set your firewall off and turn off any antivirus
The device may not be on the same network as the Tomcat server. Does your network provide VPN access? If so, try installing an Android VPN client (Junos Pulse is a good free one). Connect your device to VPN and try again.
10.0.0.2 looks like an internal address. The emulator is likely able to connect because the machine on which it is running is connected to the network. The actual device needs a direct connection as well. VPN should solve that.

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