CreateFileActivityOptions

  • CreateFileActivityOptions configures settings for the create file dialog activity, controlling new file settings and dialog behavior.

  • To use CreateFileActivityOptions, pass the options to newCreateFileActivityIntentSender to get an IntentSender that displays the user's Drive files/folders for selecting a creation location.

  • Successful file creation requires calling setInitialDriveContents and setInitialMetadata.

  • A Builder class is available to create instances of CreateFileActivityOptions.

  • The EXTRA_RESPONSE_DRIVE_ID constant provides access to the DriveId of the newly created file.

public final class CreateFileActivityOptions extends Object

Options used to configure settings for the create file dialog activity. These options control the settings for the newly created file (i.e initial metadata / contents) and the dialog itself (e.g. starting folder, etc).

To create the create file dialog activity with a specified configuration, pass the options to newCreateFileActivityIntentSender(CreateFileActivityOptions). The returned IntentSender can be used to create an activity that displays the user's Drive files / folders. The user can then select the folder he/she wishes to create the new file in.

In order to successfully create the new file, the following setters must be called:

Nested Class Summary

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

Constant Summary

String EXTRA_RESPONSE_DRIVE_ID The ID to get access to the DriveId associated with the newly created file.

Inherited Method Summary

Constants

public static final String EXTRA_RESPONSE_DRIVE_ID

The ID to get access to the DriveId associated with the newly created file.

Constant Value: "response_drive_id"