简体   繁体   中英

Android: how to load a db file on server?

I am developing an application where users can upload their own recipes. So, I want to create and put a sqlite .db file on my server and modify the database when users upload their recipes. Is this even possible? Instead, it seems that there is a way to connect an Android application to MySQL, but some people say it is not recommended to use MySQL in android.

You will probably need to create a web service to communicate with your app. There are many ways to do this. Here are a few good tutorials that might help you.

http://www.basic4ppc.com/android/forum/threads/connect-android-to-mysql-database-tutorial.8339/

http://www.helloandroid.com/tutorials/connecting-mysql-database

http://codeoncloud.blogspot.com.au/2012/03/android-mysql-client.html

Use SQLite for data stored on the Android device, and whatever DB you think is appropriate on the server.

Depends on your application. If it's a small, use Mongo db in the server side. And upload JSON Format to your server. It will save into mongo directly.

我最好的方法是通过json格式链接是教程www.androidhive.info

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM