I am trying to access a web service remotely(outside the firewall) and i am able to access it from my laptop( where i added IP Address and Host Name) in C:\Windows\System32\drivers\etc\hosts file.
But, i am unable to do the same from an Android App as i don't have a rooted phone. I can root my phone but at the end other users should also be able to use this app. How to achieve that?
What should be the ideal course of action to access remote web services if this app needs to be distributed to end users in the future.
Kindly, advise.
Thanks
Related
I want to set temporary domain and ip to hosts file. which only activate when the app is running. i want to make app work like Hosts go which works well on not rooted too.
what i'm trying to do is the server is running on Lan computer. so when app load that domain load it from Lan server.
i tried google but all i can find is DnsResolver. can anyone guide me please?
Thanks!
I've developed an android application that uses a SQL database which is running successfully on localhost. Now I want to give a demo of my application that a user could run remotely. I need to send the apk to another person. I can access the app because I am on the localhost, but how can the remote person access it?
For android app your app hosting best solution is Andorid Firebase and this service is Free.
Firebase Hosting Referance
It's also work like a web app so another person can view the demo as you required.
Firebase also provide Storage, Database and so on feature that you should be like.
Thanks.
You only have to tell the other person to use the internet address of your router.
Then on your router forward the used port to the ip address of the pc where your service runs.
Please dont talk about localhost the way you do. Every device is its own localhost. So also your Android device is a localhost. And every pc is.
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.
I am using JuiceSSH for making SSH connections to my RaspberryPi whenever I want. What I need to do is swap the IP address value into the JuiceSSH configuration file with the IP address that will be sent by RaspberryPi in case of IP address change. I am thinking about using a google apps script in which I can get the new IP address value from the e-mail. But I don't know where the JuiceSSH app holds the configurations. And I do not also know whether I can manipulate any file into an android phone using a google apps script.
Google Apps Script cannot directly access any files except those in your Google Drive.
You may be able to empower a script to indirectly change the JuiseSSH config - if you can...
Figure out where it is.
Set up a web server on your phone to accept incoming POST operations.
See this LifeHacker blog.
When a valid POST is received, decode the payload and use it to update the local file.
There will be security issues with this!
Write your Google Apps Script
Monitor your email for a message about a change in your Raspberry PI's IP address.
Figure out how to track the phone's IP address!
POST the update to your phone.
retry periodically until the POST is successful (since the phone's connection is not reliable)
Another approach would be to have a Google Apps Script WebService serve up the current address of the device; then a program on the phone could periodically reach out to the service to find out the address, and update the file.
Of course, if you connected to your Raspberry PI using a name instead of an IP address, you wouldn't have to worry about any of this.
I am building an Android application to go with my company's server.
The server is for the enterprise and resides in the customer internal network.
Each customer has obviously a different IP address assigned to the server.
This is an off the shelf product, meaning we don't build it per customer.
The client need the server IP in order to connect and start working.
Currently the client ask the user for the server IP, but the users usually don't know it.
I am looking for an easy way to be able to configure the client with a different server IP address per costumer.
We are deploying the client from the costumer internal web server (no market).
Is there a way for the client to know where was it downloaded from? than i can use this IP?
Is there a way for the client to know the apk name that was used to start the installation process? than i can rename the apk name to include the server IP.
Any other suggestions?
From your question, it seems that the customers will always be using the app on their local network. Off the top of my head, you could:
Use mDNS to find your server.
Require your customer to add a DNS entry, so that yourappname.customer.com resolves to the right address. With domain-lookup from DHCP, you should be able to resolve yourappname and have the right domain appended.
Require your customer to add a field to their DHCP response (probably more work than the customer would want).
Hit your website, have it look at the IP address it came from and work out which customer it was -- this requires you to know your customers' servers' IP addresses.