0

I've been working on my problem for too long, please do help me if you know how to :(. Ok, first of all I constructed an app based on this tutorial: http://www.androidhive.info/2012/10/android-multilevel-listview-tutorial/ and it worked fine. As you can see from the tutorial, there are 3 php files involved with the project, namely 1. albums.php, 2. album_tracks.php, and 3. track.php , but they're all contained in some unknown server. I wanted to make my own similar php files to those and save it on my computer. I've made albums.php and it worked well with the app I've made on Eclipse. Now I'm stuck at the other two. I'm not asking for a complete answer, just a short useful example would do on how do I write files album_tracks.php and track.php, or how their structure would look like. Thanks.

Tiara Zarin
  • 207
  • 1
  • 2
  • 8

1 Answers1

0

For album_tracks.php, you will have to GET the album id.

   $album_id = $_GET["album_id"]

Then you can respond with the track list within that album.

For track.php, you will have to GET the track id and respond with info on that track.

This tutorial would be a nice way to start things off.

I assume you have a database (or something else) to lookup the album id and track id. If you just have JSON files, then you will have to parse them and search for the id.

JSON parsing

Community
  • 1
  • 1
coolscitist
  • 3,317
  • 8
  • 42
  • 59