dumazy
dumazy

Reputation: 14445

Android - What should I use to get data from remote db?

I'm working on an Android app that uses data stored in a remote database. I'm now working with Parse.com for my data storage but I might change to mysql. What structure should I use to load the data on to my screen? The data are objects that I want to pinpoint on a map. So from the moment an object is loaded from the database, I want to place it on my map as fast as possible. So before all the objects are done loaded from the database, there should already be some objects shown on the map.

Should I use AsyncTask, Loader, Content provider, Service, ... ?

Upvotes: 2

Views: 3930

Answers (2)

Srneczek
Srneczek

Reputation: 2203

Web service for simple data sounds like killing fly with a bazooka. Ever heard of REST? With REST you only use http protocol and http methods (GET, PUT, POST...) to manipulate data. You need to deal with authentication ofc but it's not a big deal too. And if your data are super secret, you can always use https.

Upvotes: 0

Husam A. Al-ahmadi
Husam A. Al-ahmadi

Reputation: 2056

In general if you want your Android application to interact with remote database you have to develop a webservice that has all the methods that you want to use in your android app like insert,select,update and delete, and here is a good tutorial to start with.Click Here Please Also you can use JDBC driver library for SQL Server which allow you to connect to a database directly without using database Click here please

Upvotes: 1

Related Questions