Hi,
I'm developping an Android app and I need to create a detailed view for a TV series or a movie. The following code to get a specific MovieDb object from its id works just fine:
TmdbApi api = new TmdbApi(API_KEY);
TmdbMovies tmdbm = new TmdbMovies(api);
MovieDb movie = tmdbm.getMovie(id, LANG, TmdbMovies.MovieMethod.credits);
I tried to do the same for a TVseries object:
TmdbApi api = new TmdbApi(API_KEY);
TmdbTV tmdbtv = new TmdbTV(api);
TVSeries tvSerie = tmdbtv.getSeries(id, LANG, TmdbTV.TvMethod.credits);
However, it tells me that "TmdbTV(TmdbApi) is not public in TmdbTV; cannot be accessed from outside package". The TmdbTV constructor is indeed not specified as "public" while the TmdbMovies one is "public". I looked for the TmdbPeople constructor too (I will need it later) and it's not "public".
Would it be then possible to make these 2 constructors public? If not, is there another way for me to get a specific TVseries object form its id?
Thank you very much!
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by Prithu
on april 17, 2017 at 1:41 PM
This isn't supposed to be a problem with TMDb's API. Have you tried contacting the library's author?
P.S - I did check out the source here and yea it is pretty strange that he hasn't specified the constructor as public. If the access modifier isn't explicitly set then it defaults to protected. That is why you can't make that object. Have you tried editing the source and then using it?