Unexplained StreamLimitationException thrown on Android with Deezer SDK -
i'm using deezer android sdk. first order have things working, throws "streamlimitationexception" explanation deezer account being used on device. however, know account not being used on device -- not on mobile device, , not in browser. changed account password make sure nobody else using it.
i'm using trackplayer. i've found if try re-use same track player multiple songs, doesn't work. every time want play new song, call stop() , release() methods on existing trackplayer, obtain new one.
the exception thrown when try start playback on new song. appears random me, in i'm not aware of fixed timeout respect time the deezerconnect object authorized. furthermore, i'm trying minimize possibility of timeout -- i've used both:
deezerconnect.setaccessexpires(long.max_value);
and
deezerconnect.setaccessexpires(0);
with no luck.
additionally, i've tried periodically re-authorizing deezerconnect object every few minutes, hasn't worked.
as 1 final attempt, went account on deezer web site , deleted on "my apps" page. re-enabled app i'm working on. still hit exception.
does have suggestions how eliminate problem?
thanks!!
this turns out easy fix. deezerconnect.authorize() takes "permissions" argument. changed mine from
final string[] permissions = new string[] { permissions.basic_access };
to
final string[] permissions = new string[] { permissions.basic_access, permissions.offline_access // no timeout };
as documented @ https://developers.deezer.com/api/oauth.
problem solved!
Comments
Post a Comment