The Movie Database Support Forum

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!

1 Antwort (Seite 1 von 1)

Jump to last post

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?

Es fehlt ein Film oder eine Serie? Logge dich ein zum Ergänzen.

Allgemein

s Fokus auf Suchfeld
p Profil öffnen
esc Fenster schließen
? Tastenkürzel anzeigen

Videos

b Zurück
e Bearbeiten

Staffeln

Nächste Staffel
Vorherige Staffel

Episoden

Nächste Episode
Vorherige Episode

Bilder

a Poster oder Hintergrundbild hinzufügen

Editieren

t Sprachauswahl öffnen
ctrl+ s Speichern

Diskussionen

n Neue Diskussion erstellen
w Beobachten an / aus
p Diskussion öffentlich / privat
c Diskussion öffnen / schließen
a Diskussionsverlauf anzeigen
r Auf Diskussion antworten
l Letzte Antwort anzeigen
ctrl+ enter Senden
Nächste Seite
Vorherige Seite

Einstellungen

Diesen Eintrag bewerten oder zu einer Liste hinzufügen?

Anmelden