Hello I am making an Google Appengine hosted HTML5 webapp. It is going swell so far except that every time i want to test the webpage I have to upload it to the server so that my phone can go and get the url.
Is there any way to test a local server on my win machine on my webview?? I am really getting sick of having to upload it to appengine, seeing somethin minor wrong in the webview rendering and having to reupload it again.
Thanks
Ruben
If you're on the emulator or on the same network, your win machine is the server.
You just need to get its IP by going to command prompt and writing the command ipconfig
And use this IP on your android application
For a more detailed way to get the ip :
http://www.youtube.com/watch?v=49tYGwBhP3Y
By default, the local dev server only allows connections from the same machine. If you want to use the Android emulator, that's fine (but it sounds like you don't want to use the emulator from the comments).
You should use the --host parameter (in recent versions of the SDK) to bind your server to an address that will be visible on your network, e.g.:
dev_appserver.py --host=0.0.0.0 .
Once you've done this, you can point your web view to the address of your machine on the LAN.
Related
I am developing an app for android (with react-native) which is running in android studio emulator. This app should connect to a server, but I am in the testing phase and I run the server in a localhost port. but the localhost of another machine (which is in the same network that I am)
let's say the (local) IP of the other machine is 172.17.240.223 and the port which the server is running on is 8080
when I type 172.17.240.223:8080 in my browser (laptop browser), I get the response and there is no problem. Even when I type this in my browser in the emulator I get the response, but this won't happen in app. why is that?
More generally, it's not possible to customize the URL and how the bundle gets loaded. This flexibility is useful to have.
check issue on github here
in this case ,you can use testflight for IOS testing and for android just create apk.
I have a Chromebook that I've set up in Developer Mode, with a crouton-installed version of Linux running alongside. Within the Linux crouton, I'm running a simple web server.
My question is whether it's possible to access that server using any Android apps that are also running on that Chromebook?
Android apps have been installable natively on ChromeOS for some time, but everything that I've read says that they run in some kind of sandbox. ChromeOS itself is pretty tight with its firewall rules as well.
Just to get a start, I'm trying to use the Android version of the Chrome browser to load up a page that's running on a web server in the Linux crouton. I've tried localhost,127.0.0.1, and the Chromebook's current IP address.
I followed the instructions at https://developer.android.com/topic/arc/index.html to enable Developer Mode on the Android side and also, I think, loosen up those firewall rules on the ChromeOS side.
Is there some secret sauce that I'm missing? Is this even possible at all?
I had the exact same question and found this:
https://developer.android.com/topic/arc/index.html#network
It seems that in essence there is no IP traffic allowed from local Chrome to the Android web servers..
Update (thanks jlb for the ping)
However, you can run ifconfig in crouton. And then you can access your content via that IP address. I wonder if Firefox takes that shortcut for you..
Leveraging #tomdemuyt's post, his citation source says that android apps will be assigned a private IP address, so you can access local IP traffic, just not with localhost or 127.0.0.1.
For example, from termux execute ifconfig and look for the local IP address. Then run your service, e.g. node from termux, or kWs, any Android app.... and point Chrome to http://<your-local-ip-address>:<your-service-port>
127.0.0.1 and localhost will work from other Android apps, just not Chrome.
The solutions by jlb and tomdemuyt are for accessing a android app from chromeos (i.e. an ftp server)
However, I needed the opposite way (accessing an node server running in the linux virtual environment from android chrome browser) and that was basically the question ChillyPenguin asked for.
I finally solved it:
Start your webserver and ensure that you can access it with localhost (in my case http://localhost:8080
Within the chromeos terminal run
hostname -I
100.115.92.203 (and an ip:v6:adress:...)
(or ip addr show which is more verbose)
Now I was able to access the web server from android chrome with http://100.115.92.203:8080
I am developing an Android app using ionic. When I execute ionic serve I can see my app on my computer through http://localhost:8100
I checked my ip address using ipconfig and it's 192.168.0.3, so I tried using this IP from my device (http://192.168.0.3:8100), but I got a 404. I then tried from the very same computer I am developing from, and I got a 404 too!
Funny thing is, ionic uses two servers:
If I put http://192.168.0.3:35729 I can see live reload server both from my computer and my device. I didn't have to touch anything on my router to forward ports, and both my computer and my phone are on the same network. Note that I cannot access http://192.168.0.3:8100 neither from my phone nor from my computer (the same one I am using to develop)
Also I am serving a REST web service on 8080 from a J2EE app, and I can see it in my device. My app consumes this service, and from the computer, everything works fine. But from the device, although I can use the phone browser to access the REST server, my ionic app gives me another 404 error!
Can anyone point me in the right direction?
You will have to change the address Ionic has configured. Run:
ionic address
Then it will provide you a list of available addresses:
Multiple addresses available.
Please select which address to use by entering its number from the list below:
1) 192.168.0.107 (eth1)
2) localhost
Select your local IP from the available options. This must solve the issue you're facing.
I have an app that is running on my phone that is simply displaying a web page. I'm trying to get the website name/info so that I can browse this on my desktop. I used Packet Sniffer to get the IP address but there are multiple hosts running on this IP. What's the best way for me to get the real URL/hostnames used by an Android app?
FYI: I've decoded the app but I still haven't figured out what the URL is.
What I would do is, install the app in the emulator, and then use wireshark, which can handle http traffic.
I am trying to write a client server application, in which the client is a android device.
I am not confident on socket programming.
I have written a server side application and a client side that runs on my emulator.
Will the same application work between a real android device?
I have edited your question (once its reviewed it will show up). From what I understand, your question is generic. It works on my emulator, will it work on my device.
The answer is yes. The emulator connects to 10.0.2.2 which redirects to 127.0.0.1 on your host machine right ? This is how you would have got it working.
To get it working from a device you will need to do the following
Load your java server on your real ip address on your desktop
Ensure that your desktop is on the internet and the ip address visible to the internet (open)
Ensure that your android phone points to the public ip address of your desktop.
Now, I know your worry :) open ip address. So, you can use a ec2 (free amazon ubuntu instance), install java on it and run your server as java -jar . From eclipse you can export a jar file (runnable jar file) with lib in your jarfilename_lib path.
You can use spring For android via HTTP request.
Here is an example.
When you have static ip in server you should set that static ip in your actual device.If you are running your app on emulator you must set 10.0.0.2.