I would like to access my webserver running a Polymer starter kit app from an Android devices, but I don't seem to get it to work..
Polymer starter kit comes with browser-sync, which is very nice, but
I cán access my webapp on another laptop, but when I try to access it from an Android device it just keeps loading and eventually there will be a connection timeout. I triend another android device, but still the same.
Any Idea's how to access the app(external ip) from android?
Is this only for development/debugging purposes or do you want to deploy in such a scenario?
For debugging you can use Chrome's remote-debugging capabilities https://developer.chrome.com/devtools/docs/remote-debugging.
I haven't tried but I think the ADB tool allows to redirect TCP connections as well.
Otherwise you need to teach Android the IP routes (and optionally a DNS) so the device can route connection attempts to your server.
Related
Is it possible to connect my Android phone (Redmi Note 7) directly to my Windows (10) PC in such a way that I can make network connections to the PC from the phone, with/without a per-existing WiFi network?
My specific issue is that I want to be able to connect the camera of my android phone with the web browser using a specific IP address. This IP address when typed on the browser would open a screen that would help us to connect with the android device, basically feeding in everything what the android device camera sees.
I've already done my work on the camera2API interface work, I just need some help with the network connection part.
Ideally I'd like a solution that doesn't involve the Internet at all - neither from the PC nor the phone. In my particular situation, it would also be ideal if this can be done over a WiFi network connected via a single IP(same for phone and to be typed on the browser) would suffice.
I really need help with developing an android app that would help me to setup the connection between the android phone and PC using the TCP/IP protocol. There is already an app for serving such a purpose whose link I am providing below, but I have to add some security and login features on the existing app. All i am asking is how would I set up such a connection in the first place and proceed forward with the app.Also, Bluetooth provides a very less upload speed, and about the USB, i am trying to make the total process wireless. the link to the existing app: ip-webcam.appspot.com
Well, I am working at a similar app, and I use a modified web server for configuration and delivering images (I am doing it on the native side though, but I am sure there are plenty of Java web servers out there).
When i run my project on Emulator than localhost servery is working but when run on real Android phone than localhost server not found. So how can i access my localhost server from my real Android Device. I use XAMP server.
You cannot access localhost from your mobile device because the server is limited to your system only. In order to test the application you have to run the application on emulator so that it could find the server. Although there is a way...if you are creating a whole server that is backend and you have a network to which your mobile and system is connected then you can set your server to listen to a port on that network. I used NodeJs to accomplish that. You can search some tutorials for using NodeJs through which you can access you xampp server. You can also try AdonisJs which is a framework for NodeJs for a better approach. But keep in mind that you need a common network through which your system and your mobile device is connected. It is a bit complicated method but yes that can work. Accessing localhost directly from system to your mobile device is not possible..if you want to avoid learning NodeJs then you'll have to keep using emulator for the testing but learning something new is always amazing. So i would suggest you to learn NodeJs . Anyways you can avoid all the trouble and keep testing your application using your emulator. I hope this answer will help you :)
You should have told which ip you used running on emulator.
Your client on the android device should use the ip of the computer where your server is running on.
Android device and server computer in same WLAN.
If your computer and mobile are connected through same internet line then you can use ip of your computer instead of localhost can do the work.
You cannot access the local host server from a different node eventhough both nodes are connected to same network only way is that change the ip configuration of server to 0.0.0.0: so that you can access the server from any node just by typing the ip of the server followed by port no...
I am trying to connect to a ASP.NET WebApi service running on IISExpress through Visual Studio from an Android emulator (Genymotion specifically). I was able to set up my IISExpress bindings and firewall (as shown in posts similar to this and this) so that I could access the website externally.
I was able to successfully navigate to the service from another laptop on the network, but am still unable to accomplish it from the browser in the emulator or my own Android device (also on the network). When I try this I get a generic "Web page may not be available" message. Why can I access it from other external machines, but not the mobile devices?
Turns out Android is not able to resolve Windows hostnames so when I set up the binding to use my machine name it did not work. Once I changed it to use my IP address it was fixed.
I'm writing an app that needs to be able to access the web server on my laptop. The phone I'm developing on is acting as a WiFi hotspot which my laptop is connected to. Everything is working fine if I try to access 192.168.43.16 in the phone's browser.
But the app I'm developing is not able to access the webserver for some reason. I'm guessing it's trying to use the 3G connection instead, which of course will not work. If I turn off mobile data I get an error message in my app saying that it can't connect to 172.30.253.241:8799, which seems to be my ISP's MMS server (?). That makes no sense to me, but maybe there's some caching going on here? Again, accessing my local webserver with Chrome in the phone works perfectly fine.
The app is using the "Android Asynchronous Http Client" by loopj, which is built on top of Apache's HttpClient. What can I do to make this work?
The reason I want to be able to access the local webserver is because it makes developing and debugging the server api used with my app a lot easier and faster than FTP-ing to my production server on the web.
Problem solved!
What I had to do was set the proxy of the AsyncHttpClient, using setProxy(), before making the request. I set the proxy address to the local IP address of my laptop running the web server.
client.setProxy("192.168.43.16", 80);
Now it seems to be working as expected.
My scenario is as follow:
I'm working with an app development which a bug occurs in the app when it is in a different country than mine, and only there. The bug is related with a fail in an image download through an URL access. Right now, I haven't figured out yet what it can be. Some subjects I've already looked up are:
Its not related to internationalization and/or culture, because the code does not implement this;
Its not related to firewall/security access, because if the user in the other country opens the image's URL, he can look at the image;
Without rooting the device, is there is a way to remotely open and debug a given Android device, just like a SSH or a VNC?
Similar questions are:
Debugging android app on a device remotely
Remote Debugging
Well,
you can debug a device using a TCP/IP connection (I sometimes debug using WIFI at home). all you need to do is make sure the remote device is connected to the internet and is accessible to your PC with a direct TCP/IP connection.
As the Android device is connected in another location - you'll have to make sure your router's firewall allows outgoing connection for communications in the port ADB is using , and that the target Android device receives communications in that port (if it's behind a router - the router should allow connections under the righ port and forward all comm in that port to the android device).
in other words - you have to "tunnel" your communication to the target device. there are other tunneling solutions/products but I've never used them and I prefer the "manual" way
Good luck,
Dan
EDIT : in Android 11 - adb can work on WIFI natively : https://developer.android.com/studio/run/device#wireless
Perhaps you can have the user install something like aLogcat and have them send you a log with the failure.
Well as remotely debugging a device I don't know but you can use ACRA (Application Crash Report for Android) .
All you need is to set up a google doc, add the lib to your project and when the app crashes it will send a crash report to that google doc. See quick setup here