How i connect MySql in android
I am trying to connect mysql in android, but I can't. Are there any alternate ways to developed application without mysql if there is small database needed. And w开发者_Go百科hich one is better to use mysql or sqlite and why?
You basically give the answer yourself: android has Sqlite built in, so if you need a DB in your app, you have to use SQLite. The good thing is that it is small (and built in), so that it won't use much of the (limited) memory present on a mobile device.
You build a rest web service and then use http:// to push to that from your droid.
If you have to use the database in a scenario where your data comes from the Internet, then you would be using MySQL
(or anything similar, like MSSQL
) and will be developing web-services in PHP
, or JSP
or anything like that, to make your database available to your app.
If you have to use the database locally, you use SQLite
depends on the scenario.
For SQLite
, refer this
精彩评论