newOpenFileActivityBuilder()。setActivityStartFolder(DriveId文件夹)不起作用

时间:2014-05-02 20:53:40

标签: android google-drive-api google-drive-android-api

我一直在将最新的Google Drive API功能添加到我的Android应用程序中,并发现了以下问题:

com.google.android.gms.drive.OpenFileActivityBuilder.setActivityStartFolder(DriveId folder)

无论设置为DriveId,它始终会打开根Google Drive文件夹。我知道我有正确的DriveId,因为它适用于:

newCreateFileActivityBuilder().setActivityStartFolder(DriveId folder)

这是[OpenFileActivityBuilder文档]。(https://developer.android.com/reference/com/google/android/gms/drive/OpenFileActivityBuilder.html#setActivityStartFolder(com.google.android.gms.drive.DriveId))。

在我寻找答案时,我找到了same issue的其他人。 .setActivityStartFolder附近有评论说//不起作用!

    IntentSender intentSender = Drive.DriveApi
            .newOpenFileActivityBuilder()
            .setMimeType(new String[]{ "text/xml"})
            .setActivityStartFolder(DriveId.decodeFromString( preferences
               .getString("FitnessAssessmentFolderDriveId", ""))) //doesn't work
            .build(mGoogleApiClient);

0 个答案:

没有答案