Handling of Thumbnails in Google Drive Android API (GDAA) -
i've run following problem when porting app rest api gdaa.
app needs download of (thousands of) jpeg images based on user selection. way solved in app downloading thumbnail version first, using construct of rest api:
private static inputstream getcont(string rsid, boolean bbig){ inputstream = null; if (rsid != null) try { file gfl = bbig ? mgoosvc.files().get(rsid).setfields("downloadurl" ).execute(): mgoosvc.files().get(rsid).setfields("thumbnaillink").execute(); if (gfl != null){ genericurl url = new genericurl(bbig ? gfl.getdownloadurl() : gfl.getthumbnaillink()); = mgoosvc.getrequestfactory().buildgetrequest(url).execute().getcontent(); } } catch (userrecoverableauthioexception uraex) { authorize(uraex.getintent()); } catch (googleauthioexception gauex) {} catch (exception e) { } return is; }
it allows either 'thumbnail' or 'full-blown' version of image based on bbig flag. user can select thumbnail list , full-blown image download follows (all of supported disk-base lru cache, of course).
problem is, gdaa not have option ask reduced size / thumbnail version of object (afaik), have resort combining both apis, makes code more convoluted then (bottom of page). needles state 'resource id' needed rest may not available.
so, question is: there way ask gdaa 'thumbnail' version of document?
downloading thumbnails isn't available in drive android api, , unfortunately can't give timeframe when available. until time, drive java client library best way thumbnails on android.
we'd appreciate if go ahead , file feature request against our issue tracker: https://code.google.com/a/google.com/p/apps-api-issues/
that gives requests more visibility our teams internally, , issues marked resolved when release updates.
Comments
Post a Comment