Hi everyone. Can you please tell me how can I make a simple connection with remote db in android app? Basically, I want to save users names, emails etc. in a remote database and retrieve them later on demand. When answering - could you provide me some sample code so I can figure it out myself please? Thanks in advance!
A:
I guess you could use common Java libraries to create a connection to a database. But you are working on a mobile device, this means that you have to work with constant connection interruptions etc. A database connection that is opened for a longer time can be difficult with this kind of network issues.
I would suggest to have a simple (maybe REST based) web service that lets you provide the input to the db via a simple short lived http request.
Janusz
2010-06-22 10:30:22
Thanks Janusz for the reply. It's a very nice hint for the thing I'm trying to do. However, I found excellent tutorial here: http://downloadandroid.info/2010/05/how-to-connect-to-mysql-database/
Pavel
2010-06-22 12:08:22