1

I am trying to build a desktop application and an android application for a small business. A database will need to be accessed from both applications and the android app will not be using the same network as the desktop. Can someone point me in the right direction towards a solution? Also, there will be very little traffic to the database. Any suggestions? I would like for the desktop application to be able to host a remote database, whereas the android application will simply connect to the desktop computer through a web service.

Thanks!

5
  • 1
    You'll need to host the database somewhere that is exposed to the internet, then both the desktop application and the android application can point to that internet-accessible host. Commented Jan 30, 2017 at 18:25
  • @Alex R - Okay, so a database on a seperate machine would be the best choice? Also, the desktop application will only be on a single machine. The android app will be used by several devices. Commented Jan 30, 2017 at 18:26
  • The main idea is that wherever the database is hosted, it's accessible from the internet. Which machine isn't as important. you COULD host the database on the desktop that is running the application, and expose it to the internet, but there are a lot of security concerns to be addressed that would probably make it safer and more reasonable to host it on a paid hosting service and use a web service to interface with your applications. Keep in mind that anything you do that is exposed to the broader internet needs to be properly secured, which is a whole domain in itself. Commented Jan 30, 2017 at 18:44
  • If the company already has a website hosted, you may want to see if the service they are using supports web applications and databases. It's likely that it does. Commented Jan 30, 2017 at 18:45
  • To say it very simple your desktop must have a public IP address. Alex was trying to say you can host your database on a server(with a public IP) Commented Jan 30, 2017 at 18:46

1 Answer 1

3

You better host the database on a server. You can use a server side language like PHP or any language you prefer.

Android app will communicate with PHP/server side language. And server side language will process the data. Same goes for your desktop client.

You can follow this tutorial to setup Android:

How to connect Android with PHP, MySQL

It is not that much complex.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.