How to host an android application without using localhost - android

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.

Related

add host and ip address to access remote web services in Android

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

Cant access wamp server(localhost) for my social android app?

I finished creating my social app yesterday and uploaded it to the Play Store. Using the ip address http://192.168.56.1/index.php on an emulator, it was working, but now in a real android device, it doesn't work.
How can I fix this issue ?
I even assigned my ip address but didn't work.
Help will be appreciated.
Actualy you are trying to access to your local server from a remote device, so this is normal! you have to put your web services in an online server (PUBLIC IP) ... The application keep working for you because you already have WAMP server runing localy, if you turn down your server it won't work anymore .. The android device doesn't have access to your WAMP, unlike the emulator!
Note: If you put your WAMP online, you can manage to run your android application, but this is not a good solution because you need something available 7/7 & 24/24 ( a web server ), you can host your scripts on a shared hosting server for a cheap price ..

How an Android phone interacts with the server?

I have an app running fine in emulator but not in mobile. That is app basically fetch some records from server using webservice.(SOAP). Installation is successfull and i can open the first page.but not able to proceed further due to server communication. I need your help in making this app to work fine in my android phone too. Thanks in advance!!
You must be accessing the web service on your local network (localhost). An emulator can access a localhost web service, but a real device cannot. To test the app on an actual device, you need to expose your web service through a public IP address (public URL).

how jsp-android web service work without hosting for testing

i want to do a academic web-android project that named tour-trips planer. but web service part is not working in it. i want MySQL database to access my android app. how to work it without hosting? and i'm totally a beginner..
you need to your android application and web service in the same network
you can do this using one of these methods
using app to share network connectify
see this How can I access my localhost from my Android device?
and this How can I access my localhost from my Android device?
i hope this helps you

Syncing between a local network and Android application

I am in need of some help here.
I want to make an Android application that eventually syncs to a web server in order to get information (i.e. user can write a note through the website, and it automatically syncs to the phone).
I am aware that I would need some web servers and hosting, and don't know too much about that so I will look into it later.
MY question, however, is how I can simulate this over a local network?
As in, if I create a basic webpage that has a two text boxes (one for name, one for content) and a 'submit' button, if I run it via localhost WHAT methods can I use to get this information to sync to my handset?
If anyone could be kind enough to give me a laymens terms breakdown it would be seriously appreciated, I feel so lost!
You have some alternatives to achieve what you want, here is a traditional one:
Start with installing XAMPP and run a local server
Write your web pages, store the data in mysql
Write PHP code to extract the data from mysql
Use Android HttpClient to call your PHP
There are other alternatives:
Use the same method but instead of PHP write HTML5 and you have a mobile WEB application
Check out the GCM Demo Application
Check out Google App Engine
Check out Amazon Web Services
There are others
Enjoy :)
Yaron
When you use localhost (meaning you install a server package such as Apache / IIS / XAMPP / WAMP in your computer), your machine becomes a server. So, you can access the localhost from any device which is in the same network.
Say you have a computer connected to a WiFi router. If you setup the server i.e. the localhost in that computer and a laptop and a mobile phone is connected to the same WiFi router, the phone and laptop will be able to get service from the computer.
To access data stored in the MySQL server from the other devices (e.g. the phone), you have to write proper service. Else, you can write a mobile web app in the server that accesses the MySQL data and just access it from the device.

Categories

Resources