Reputation: 1429
I have been working on this little music player for a while and I have been stuck for quite a couple of days in creating a now-playing list. I was thinking about storing it inside the database back end. Well, I have a remote interface and what I would like to do is that I would like to query and retrieve data from the database, from that remote interface. Any one would care to shed some lights?
Upvotes: 0
Views: 347
Reputation: 200150
Usually, the best way to do so is creating a REST API in the remote side. As you don't provide too much info let me suppose the remote database lives on a MySQL server and that you have PHP on that remote server too. In that case, you can write a PHP script that reads the database and returns a JSON response containing the data you want. Then, from your android App you just have to query that script and parse what you get.
This has too many advantages:
org.json
)Upvotes: 1