I'm trying to get imdb_id from TMDB API but my app keeps throwing this error!
My code:
String URL2 = "http://api.themoviedb.org/3/tv/" + mTVShowId + "?api_key=" + AppConfig.API_KEY + "&append_to_response=external_ids";
JsonObjectRequest jsonRequest = new JsonObjectRequest (Request.Method.GET, URL2, null, response12 -> {
try {
JSONArray array = response12.getJSONArray("external_ids");
for (int i=0;i <array.length(); i++) {
JSONObject object = array.getJSONObject(i);
imdbID = object.getInt("imdb_id");
Log.d("IMDB_ID", " " + imdbID);
}
} catch (JSONException e) {
e.printStackTrace();
}
}, error -> error.printStackTrace());
Volley.newRequestQueue(ShowDetailActivity.this).add(jsonRequest);
When I try suggestions from other posts, I always get error at "Response.Listener()" which says "Cannot resolve symbol 'Listener'"
Any help?