welcome to linkAR technical documentation

next previous

Downloading TMDB Data

In MovieInfoLoader.java we have

private class downloadPopularMovies extends AsyncTask<Void, Integer, Void> {

The AsyncTask that connects to the TMDB api and downloads the popular films.

  protected Void doInBackground(Void... params) {
    String Url = AppVariables.MOVIE_POPULAR_DB_URL + "&page=" + String.valueOf(1);
    try {
      sJson = httpConnector.getJsonStringFromServer(Url);
      if(sJson != null)
        //Process the info
        // In this function we save the data 
        // into SD for further access in SDdataParser
    } catch (JSONException e) {
    return null;

You can see how we use TMDB API in the parseAndSaveMovieData function.

next previous