java.lang.Object | |
↳ | com.google.android.gms.drive.OpenFileActivityBuilder |
A builder that is used to configure and display the open file activity. This activity displays files and folders from the user's Drive. The activity can be used to display all files in the Drive, not just those your application has access to. Your application will be given access to the selected file.
To display the activity, pass the result of build(GoogleApiClient)
to
#startIntentSenderForResult()
.
When the activity completes, a successful response will include an extra
EXTRA_RESPONSE_DRIVE_ID
with the selected DriveId
.
Note: you cannot use #startActivity
to invoke the activity. This will fail.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | EXTRA_RESPONSE_DRIVE_ID |
A successful result will return an extra by this name which will contain the DriveId
of the selected file.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Builds an
IntentSender from the builder attributes that can be used to start the Open
File activity using
startIntentSenderForResult(IntentSender, int, Intent, int, int, int) .
| |||||||||||
Sets the folder that the Activity will display initially.
| |||||||||||
Sets the title displayed in the activity.
| |||||||||||
Sets the MIME type filter which controls which kinds of files can be selected from the file
picker.
|
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
A successful result will return an extra by this name which will contain the DriveId
of the selected file.
Builds an IntentSender
from the builder attributes that can be used to start the Open
File activity using
startIntentSenderForResult(IntentSender, int, Intent, int, int, int)
.
apiClient | The GoogleApiClient to service the call. The client must be
connected before invoking this method.
|
---|
Sets the folder that the Activity will display initially. If not specified, it will default to the root of "My Drive".
Sets the title displayed in the activity.
title | the title to set on the activity (may not be null) |
---|
Sets the MIME type filter which controls which kinds of files can be selected from the file picker. If this method is not called or if a zero-length array is provided, all non-folder files will be selectable.
mimeTypes | the mime types to show in the picker. May not be null. If a zero-length array is provided, all non-folder files will be selectable |
---|