Send feedback
Resource summary for Google Picker API
Stay organized with collections
Save and categorize content based on your preferences.
The Google Picker API uses a builder pattern with
PickerBuilder
and Picker
.
const picker = new google.picker.PickerBuilder()
.setOAuthtoken('TOKEN_FOR_USER')
.setAppId('1234567890') // Cloud Project number
.addView(google.picker.ViewId.DOCS)
.setCallback((data) => {
console.log(data);
})
.build();
picker.setVisible(true);
Classes
Name
Description
DocsUploadView
Use DocsUploadView
to upload files to Google Drive.
DocsView
Use DocsView
to select files from Google Drive.
Picker
Picker
is the top level object representing the UI action with the user. These objects are not created directly, but instead use the PickerBuilder
class.
PickerBuilder
PickerBuilder
is used to create Picker
objects. Except where noted otherwise, the return type of methods below is of type PickerBuilder
, allowing you to chain one call after another.
ResourceId
ResourceId
is a utility class for generating resource IDs for documents.
View
An abstract class for all views.
ViewGroup
A ViewGroup
is a visual grouping of views in the navigation pane.
Enums
Name
Description
Action
The action type for the ResponseObject
.
Audience
Audience
is an enumerated type used to describe the audience of the DocumentObject
.
DocsViewMode
DocsViewMode
is an enumerated type for displaying data within a DocsView. Use these values in calls to DocsView.setMode
.
Document
Document
is an enumerated type used to describe the fields of a DocumentObject
.
Feature
Feature
is an enumerated type, for turning on/off features for various views. Use these values in calls to PickerBuilder.enableFeature
and PickerBuilder.disableFeature
.
Response
Response
is an enumerated type used to describe the fields of a ResponseObject
.
ServiceId
ServiceId
is an enumerated type used to describe the service the item was selected from.
Thumbnail
Thumbnail
is an enumerated type describing the fields of a ThumbnailObject
.
Type
The type of the selected item.
ViewId
ViewId
is an enumerated type for the various views available in the Picker. Use these values in calls to DocsView
and PickerBuilder
.
ViewToken
ViewToken
is an enumerated type used to describe the elements of a ResponseObject.viewToken
.
Interfaces
Name
Description
DocumentObject
DocumentObject
is an interface describing the attributes of a selected item.
ResponseObject
The response object passed to the callback method.
ThumbnailObject
ThumbnailObject
is an interface describing the attributes of a photo or video.
Type aliases
Name
Description
Locales
The supported ISO 639 language codes for PickerBuilder.setLocale
.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-26 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-09-26 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-26 UTC."]]