Question

I am using the google drive picker to open files from google drive within a web page. The dialog works correctly in most browsers including mobile Chrome, however, with the Android browser, tapping on a file does not select it.

This is using a Samsung Galaxy Note 1 with factory settings + updates. I can replicate this problem with an unrelated application, mindmup which I will use this as the reproduction steps given its publicly accessible:

i) http://www.mindmup.com/

From any machine, create and save a mindmap to your google drive

ii) With the Android browser, revisit the site and choose File -> Open ->From Google Drive

iii) The google drive picker will appear and display your file. The dialog will be scrollable and can be cancelled but tapping a file will not select it.

How can I fix this problem in the Android browser?

Was it helpful?

Solution

The official Google response is that the picker does not support Android. Huh. Works on IOS. Maybe they could add that little tidbit to their documentation.

No other recourse but to implement my own using the files.list api:

    retrieveAllFiles = function(callback) {
        var retrievePageOfFiles = function(request, result) {
            request.execute(function(resp) {
                result = result.concat(resp.items);
                var nextPageToken = resp.nextPageToken;
                if (nextPageToken) {
                    request = gapi.client.drive.files.list({
                        'pageToken': nextPageToken,
                        'q' : 'trashed = false'
                    });
                    retrievePageOfFiles(request, result);
                } else {
                    callback(result);
                }
            });
        };

        var initialRequest = gapi.client.drive.files.list({
            'q' : 'trashed = false'
        });

        retrievePageOfFiles(initialRequest, []);
    };
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top