Android App & MySQL

luke2012

Well-Known Member
Licensed User
Longtime User
Hi to all the community!
In your experience wich is the best way to distribute an android app and a centralized MySQL database ?
I mean that the installation of the MySQL db must be user friendly.

So the app will be distributed by Google Play, but the MySQL should reside on a PC machine within a MySQL server. It's right ?
If it's right the point is, how to delivery the MySQL db to the end user ?

Thanks in advance !
 

warwound

Expert
Licensed User
Longtime User
Oh and if you want to create a custom front end for a MySQL database without all the functionality that phpMySQL provides then look at DaDaBIK.

It's quite a decent application (free again!) - you can build a user friendly front end to allow various degrees of access to a database.

Martin.
 
Upvote 0

timo

Active Member
Licensed User
Longtime User
...So the app will be distributed by Google Play, but the MySQL should reside on a PC machine within a MySQL server. It's right ?
If it's right the point is, how to delivery the MySQL db to the end user ?
Thanks in advance !
I don't understand which is the sense of distributing a MySql DB within an app. Normally, mySql is on a website and serves all the distributed apps, for example for downloading added ressources,etc. And the DB is configured by the developper self.
Did you mean something else?
 
Last edited:
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
I agree with you.
My problem is to have a shared db between android devices.
The project is designed for restaurant's waiters so the data available for waiters shold be shared.

Actually I'm using a SQLite db to develop my project.
So in order to share certains tables between many devices which is the best solution ?
 
Upvote 0

Jack Cole

Well-Known Member
Licensed User
Longtime User
If you are setting something up that will be used only within one restaurant while the waiters are connected to WiFi, you could use a PC on premises. If they need to be able to access the data from more than just within the building connected to WiFi, you'll need to have web hosting account with mysql support.

What you'll probably need to do is to set up a website (register the domain), and find a web hosting provider that has MYSQL built in. Then you'll want to use the PHP script (which you can find by searching the forums) to connect to the MYSQL database.

Either way, the simplest approach is to set up a webhosting account that supports PHP and MYSQL. Most hosting accounts have PHPMYSQL built in for administration. If you are advanced with SQL, I'd recommend Oracle's MYSQL workbench for working with the database.
 
Upvote 0

jndaniels1

Member
Licensed User
Longtime User
use a webservice

My problem is to have a shared db between android devices.
?

If I recall Erel has as small tutorial regarding just this issue with example code...

You will need MySQL and Apache, and a script that acts as a web service. Using the HTTP Library you would send your request to a script that acts as a web service (an intermediary script) like a php script that would then send that request to the MySQL and returning any responses.

This can be used in a local network setting (In your restaurant) and have the other devices make timed requests to see if any changes are made.

If you need it in the outside world too, then you will need what Jack has described - A Host with MySQL, etc.

Another option is to use ObjectStorage which a bit more complex but it uses the same HTTP protocol to get and put objects (i.e files, photos, backups, databases) but no MySQL, web service or Apache although this is getting into that Cloud storage stuff.

Hope helps.
Jeff

I found the link:
http://www.b4x.com/forum/basic4andr...roid-mysql-database-tutorial-3.html#post81410
 
Last edited:
Upvote 0

warwound

Expert
Licensed User
Longtime User
If you need to set up local webserver - on a PC in the restaurant - then look at XAMPP.

It's a single installable package that includes Apache, MySQL and PHP.
I think it even has a FTP server included.

You can get versions for Windows, Linux, Mac OS X and Solaris.

Martin.
 
Upvote 0
Top