[英]How do I access google drive api from my app
I try to access google drive from my app so for that authentication required.我尝试从我的应用程序访问谷歌驱动器,因此需要进行身份验证。 I setup the code in developer console.but when I try to implement GoogleSignInOption and GoogleSignInClient code it display mail popup which are logged in by my device but when I pressed any one mail it can not proceed further, just only show progressbar,what I do console not show any error too.我在开发人员控制台中设置了代码。但是当我尝试实现 GoogleSignInOption 和 GoogleSignInClient 代码时,它会显示由我的设备登录的邮件弹出窗口,但是当我按下任何一封邮件时,它无法继续进行,只显示进度条,我做什么控制台也没有显示任何错误。
My code was:我的代码是:
GoogleSignInOptions signInOptions = new
GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestEmail()
.requestScopes(new Scope(DriveScopes.DRIVE_FILE)).build();
GoogleSignInClient client = GoogleSignIn.getClient(this,signInOptions);
startActivityForResult(client.getSignInIntent(),REQUEST_CODE_SIGN_IN);
process is not entered in onActivityResult method,please let me know what to do for solve this problem.在 onActivityResult 方法中没有输入进程,请告诉我如何解决这个问题。
This is a google bug, to fix it you have to set your app status as published in Google Developers Console这是一个谷歌错误,要修复它,您必须将您的应用状态设置为在 Google Developers Console 中发布
Go to the Developers console and click in the Google OAuth Consent Screen part Go 到开发者控制台并点击 Google OAuth 同意屏幕部分
Then click in Publish app to set your app status as published然后单击发布应用程序以将您的应用程序状态设置为已发布
This is needed because of a Google bug you can check it out here: https://issuetracker.google.com/issues/178183308这是需要的,因为您可以在此处查看 Google 错误: https://issuetracker.google.com/issues/178183308
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.