OpenFileActivityOptionsStay organized with collectionsSave and categorize content based on your preferences.
Page Summary
OpenFileActivityOptions is a class used to configure the open file dialog activity for Drive, allowing filtering of search results.
These options are passed tonewOpenFileActivityIntentSenderto create an activity that displays files and folders from the user's Drive.
The calling application gains access to the selected file once the user chooses one.
OpenFileActivityOptions.Builderis a nested class for creating instances of OpenFileActivityOptions.
EXTRA_RESPONSE_DRIVE_IDis a constant used to access the ID of the selectedDriveId.
public final classOpenFileActivityOptionsextendsObject
Options used to configure settings for the open file dialog activity. Using these options,
search results of a user's Drive can be filtered for a faster experience and more narrow
results.
To create the open file dialog activity with a specified configuration, pass the options
tonewOpenFileActivityIntentSender(OpenFileActivityOptions). The returnedIntentSendercan be used to create an activity that will display all files and folder from the user's
Drive, including those that the calling application does not have explicit authorization to
access.
Once the user selects a file to open, the calling application is given access to that
file.
[[["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-10-31 UTC."],[],["`OpenFileActivityOptions` configures the open file dialog, allowing filtered searches of a user's Drive. Options are passed to `newOpenFileActivityIntentSender` to create the dialog activity, which displays all files, even without explicit access. Upon user selection, the application gains access to the chosen file. The `EXTRA_RESPONSE_DRIVE_ID` constant provides the selected `DriveId`. The class includes a Builder for creating instances and inherits methods from `java.lang.Object`.\n"]]