要求用户使用以下方式从驱动器帐户中选择文件
IntentSender intentSender = Drive.DriveApi .newOpenFileActivityBuilder()
.setMimeType(new String[] { "text/plain", "text/html" })
.build(getGoogleApiClient());
try {
startIntentSenderForResult(
intentSender, REQUEST_CODE_OPENER, null, 0, 0, 0);
} catch (SendIntentException e) {
Log.w(TAG, "Unable to send intent", e);
}
在OpenFileActivityBuilder中使用setActivityStartFolder并指定文件夹的DriveId。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句