android UserRecoverableAuthException没有抛出

时间:2014-11-10 11:59:22

标签: android google-drive-api

我正在使用Google API Java客户端从谷歌驱动器获取文件。在guide建议捕获UserRecoverableAuthException以确定用户登录。

credintial.setSelectedAccountName(eMail);
JsonFactory jsonFactory = new AndroidJsonFactory();
Drive drive = new Drive.Builder(AndroidHttp.newCompatibleTransport(), jsonFactory, credintial)
        .setApplicationName(mActivity.getResources().getString(R.string.app_name)).build();

Drive.Files.List request = drive.files().list();
request.setFields("items(id,mimeType,title,downloadUrl)");
FileList result = request.execute();

token = credintial.getToken();

但是行token = credintial.getToken();不会抛出此异常。我做错了什么?

0 个答案:

没有答案