rdio / api

A public issue tracker for the Rdio API
http://www.rdio.com/developers/
26 stars 3 forks source link

[Android] Streaming top chart songs #135

Open AdrianHarr opened 9 years ago

AdrianHarr commented 9 years ago

Songs obtained from "getTopCharts" return canStream as true, but when the track keys are requested in a "get", canStream returns false. This was tested with an unlimited account.

dasevilla commented 9 years ago

This can happen if the server making the API request is in a region different from the user. Ensure that you're making API requests with the user's access token and secret.

You should also check our guide to regions.

AdrianHarr commented 9 years ago

I'm using this to pass the user in the request

  List<NameValuePair> args = new LinkedList<NameValuePair>();
args.add(new BasicNameValuePair("keys",keys));
args.add(new BasicNameValuePair("user", userKey));
args.add(new BasicNameValuePair("extras","trackKeys"));

rdio.apiCall("get", args, new RdioApiCallback() {
            ...
    }

I checked the stream regions of the user, it is US. The track from the "get" request does not have US as a stream region, so I need the alternative track, which the region guide says is not easy to find.

dasevilla commented 9 years ago

user isn't a valid parameter for the get API method. The access token and secret determine the user of the request.

AdrianHarr commented 9 years ago

I believe these are set in the super method of onRdioAuthorized, or in my onActivityResult if necessary. Megan Trainer (sp) All About the Bass on a get request returns 5 streaming regions, none of which are US.