I’m running an Ubuntu web server on my local network, hosting websites that can be accessed anywhere on the network using https, such as https://ubuntu-server/website01/index.php
However, I cannot access such websites on the browsers of my Android phone that is connected via Wi-Fi. I have tried using the IP address instead of the domain name, ect. The phone is able to connect to external websites. Surprisingly I have not found information about this that has worked. Also the local sites are able to be accessed by default on iOS but not Android.
Is it some sort of a firewall issue in the Android phone? If so, where I do set that using the default software?
I see a lot of options for adding third party firewall software to Android, would I need to go that route instead? I would like to know how to do it by default anyway if possible, however.
Thanks for your help.
Related
I used Charles Proxy before, which can modify the data received by a browser, so it is really convenient that we can test our bug fixes without modifying the production server, either for the webpage content or for the AJAX data.
Is it possible to do something similar for a mobile phone app, either for iPhone and Android phones? I can let the Mac (or probably a PC too) act as a Wifi station (access point) and let the mobile phone connect to it, and is there an app that can act like Charles Proxy (perhaps Fiddler?) that can examine and modify data?
#nopole If you are using Charles, I suppose you can use Breakpoint feature to intercept and edit HTTP requests/responses coming from/to your mobile devices. It works for both browsers and mobile devices. Or else you can try using Proxyman. It's a native macOS app and quite similar to Charles/ Fiddler. You can read an example of how to use the Breakpoint to manipulate data here. Hope it helps! :)
TL;DR: I have access to the localhost on my iPhone but can't reach local websites because I have no access to the host file.
Hi everyone,
I have a local website that uses a CMS setup on my laptop. The binding is specified correctly in IIS and reachable on my laptop. By getting the local address (192.168.xxx.xxx) and opening the appropriate ports, I am able to reach the localhost on my desktop computer and my iPhone. By adding the host name to the host file on my desktop, I am able to reach the website. So far so good!
However, I am not able to reach the site on my iPhone as I have no access to the hosts file. I tried setting up a binding that specifies the IP address and a set port (192.168.xxx.xxx:port) with limited success, the site was reachable but the CMS I am using on my site requires a hostname to function correctly. I want to be able to reach the site using an Android phone as well if possible, but again, I have no access to the host file.
I know its possible to fix this with DNS forwarding but I don't have access to the router over the network I am using.
Is it possible to specify the hostname in the url along with the IP address? Something like 192.168.xxx.xxx:hostname? If this is possible, I will be able to access the site on my iPhone and also on Android phones.
Any advice would be greatly appreciated, thank you!
OK I found an alternative to all this by forcing my phone to use the host file on my laptop. I found the answer here:
https://stackoverflow.com/a/6385967/2398998
I am trying to implement a WiFi related application that will be used on mobile phones.
I can do these easily on android using the WiFiManager class where I can get the list of the WiFi Networks available around the phone, or even with the WifiInfo class.
However, I want to make this app more general rather and run in from a browser rather natively via android.
My question is, can I do such things using a client side scripting language that can run inside a browser that can be used literally on any phone that has a browser?
You will not find a way of directly accessing available networks inside a browser. This is because of security reasons. The JavaScript sandbox makes sure no such information is exposed to possible malicious websites.
You could rather make some ajax request to a native app and pull needed data from there.
I have searched for a solution to this but could not find one. If this is already answered, sorry, please direct me to that.
My problem is this. I have java web application running on a local intranet (Tomcat 7, Java 6, MySQL). All desktops within the intranet are connected thru LAN and access the application using the specific server IP, something like 198.162.2.10.
Now, I want to access this thru my android mobile phone as well. The entire building is Wifi enabled and I'm able to access this web application, if I know the IP and enter it in the mobile browser. But, I would like to make this mobile access automatic and wrap it in an app which on click access this automatically, even when the IP changes. We have dynamic IPs.
You can use WebView component to display a web page within your application.
As alternative you can use HttpURLConnection co perform Http request and posts to your web application.
Regarding the dynamic IP you can configure a Local dns server or assign a static IP to the server.
Anyway the application need a fixed address to connect to the web application, unless you want to insert the address manually each time.
Requirement: I want to control my android phone through my laptop using WI-Fi. For this I need to run a web server and a "customized" web app that runs on the android phone over a particular port and the wifi adapter's ip address. For example , I can connect to the web application running on my phone through the browser in my laptop using : http://(ip address of the phone):port
Things I have tried: I evaluated a few webservers for android that lets me run java based servlets like (ijetty). There are others like TWJS , KWS , PAW etc. So far, I am able to run them on the phone and access the web server through my laptop.
My Question: Of all the resources and materials pertaining to developing apps for Android , I'm having a real hard time finding any useful and clear information on what web technology should I create a web application that can use the android APIs and effectively communicate with the phone just as any native Android application.
i-Jetty claims to support Web Applications that can use the android apis , but lacks any sincere documentation on how to build to such web application/servlets that uses Android APIs.
While,my requirement is similar to what to an existing application for Android does namely AirDroid, it is not open source and neither it discusses anything related to its implementation architecture. So, I am open to any suggestions that can help me create a web application for the managing the android phone wirelessly.
Giving a look at the i-jetty example application you can see that it's possible to retrieve the Context and ContentResolver objects:
android.content.ContentResolver resolver = (android.content.ContentResolver)config.getServletContext().getAttribute("org.mortbay.ijetty.contentResolver");;
android.content.Context androidContext = (android.content.Context)config.getServletContext().getAttribute("org.mortbay.ijetty.context");
through which you can access system services, read and write preferences, execute queries to retrieve contacts etc. as if it was a normal android application.