OpenFileActivityOptions

  • OpenFileActivityOptions is a class used to configure the open file dialog activity for Drive, allowing filtering of search results.

  • These options are passed to newOpenFileActivityIntentSender to 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.Builder is a nested class for creating instances of OpenFileActivityOptions.

  • EXTRA_RESPONSE_DRIVE_ID is a constant used to access the ID of the selected DriveId.

public final class OpenFileActivityOptions extends Object

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 to newOpenFileActivityIntentSender(OpenFileActivityOptions). The returned IntentSender can 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.

Nested Class Summary

class OpenFileActivityOptions.Builder Builder used to create a new instance of OpenFileActivityOptions

Constant Summary

String EXTRA_RESPONSE_DRIVE_ID The ID to get access to the selected DriveId.

Inherited Method Summary

Constants

public static final String EXTRA_RESPONSE_DRIVE_ID

The ID to get access to the selected DriveId.

Constant Value: "response_drive_id"