Reputation: 267
I am trying to learn to implement android apps to get news, promotion message, and calendar from server. What is the best and easy way to communicate with database server? using JDBC or other methods?
Thanks
Upvotes: 0
Views: 192
Reputation: 3851
To communicate between a server and an android device you can use JASON. See following links for some help.
http://www.androidhive.info/2012/01/android-json-parsing-tutorial/
https://www.learn2crack.com/2013/10/android-asynctask-json-parsing-example.html
https://www.learn2crack.com/2013/10/android-json-parsing-url-example.html
Also in the device to deal with data within the device you can use SQLite. And in the server you can use jdbc if you are using servelets.
Upvotes: 1
Reputation: 2017
Using JDBC?:
In the words of Commonsware:
Never never never use a database driver across an Internet connection, for any database, for any platform, for any client, anywhere. That goes double for mobile. Database drivers are designed for LAN operations and are not designed for flaky/intermittent connections or high latency.
On the client side (Android app), you can use SQLite to store data locally. It might not be necessary at all actually. For instance, it can be used for offline features, search, etc. For client-side, read up on this simple post
On the server side (whatever server side technology you know or want to learn), you can use whatever language, whatever database on whatever server OS you want. This part is commonly called the back-end, which will store your data while your app communicate with it through HTTP.
Upvotes: 2
Reputation: 3182
You can use json to parse data between server and the android device. In the server you can use jdbc with json if you are using servlets in the server.
Upvotes: 1
Reputation: 4114
To communicate with Database server You should use web service API such REST , soap
Upvotes: 0