0

I'm developing an app for android, and I have to request some data that is stored in my webpage database.

How can I connect over internet to that database to retrieve the data I need?

Pablo
  • 9,424
  • 17
  • 55
  • 78

1 Answers1

0

On the server, you build a Restful API, you create API Endpoints - this is a web service that lets authorized users to call URL addresses passing certain parameters, asking for data, and then retrieve this data from the database and provide it to them

In your app, you insert network access permission in the AndroidManifest.xml file. Then you get a networking library, Retrofit for example and you learn how to use it in order to access the API service.

You perform your calls asynchronously and work with the results in callback methods in the UI thread. You can do that either by multitrhreading or using a library, RxAndroid, for example. Android Framework's AsyncTask class is good for beginners.

Kaloyan Roussev
  • 14,515
  • 21
  • 98
  • 180