OneDrive / onedrive-sdk-android

OneDrive SDK for Android!
https://dev.onedrive.com
Other
148 stars 52 forks source link

getNextPage() does not work, gets the same page instead #96

Closed saucepwn closed 8 years ago

saucepwn commented 8 years ago

When calling IItemCollectionPage, I would expect that the next page is returned, however, the current page is returned over and over again.

getNextPage() returns a correct IItemCollectionRequestBuilder, in my case, with the baseUrl: "https://api.onedrive.com/v1.0/drives('me')/special('photos')/children?$skiptoken=MjAx"

However, when I call .get() on the IItemCollectionRequestBuilder, inside BaseRequest.getRequestUrl(), the query string parameter is stripped from the URL, which causes it to make a request to the original URL: "https://api.onedrive.com/v1.0/drives('me')/special('photos')/children" and return the same first 200 elements.

Below is the call stack that points exactly where the query string is being removed (sorry for the screenshot) image

It looks like the query string should not be removed.

daboxu commented 8 years ago

hi @saucepwn try use the updated version 1.2.2 which should have the fix

saucepwn commented 8 years ago

Thank you! Speficially requesting version 1.2.2 fixed the issue.

compile ('com.onedrive.sdk:onedrive-sdk-android:1.2.2') { transitive = false }