我正在将Google云端硬盘整合到我的应用程序中。
使用以下链接,我可以连接到Google驱动器,并能够下载文件并能够将文件上传到Google云端硬盘。
https://developers.google.com/drive/quickstart-android
以下是我用来将文件上传到云端硬盘的代码。
内联图片2
使用上面的代码,我可以将文件上传到驱动器,并从上面图片中的行号20 - 23上传,我得到文件元数据,如downloadUrl,alternateUrl和webcontentLink。
现在我正在尝试使用AlternateUrl加载WebView并且页面正在加载但是它再次要求Google凭据。如何避免webview要求Google Credential。以编程方式,如何在未明确输入Google用户名和密码的情况下在webview中登录Google帐户。我希望webview使用AccountManager或Google Play服务API来选择帐户。
我在下面提到了链接,但无法完成我需要的工作。
http://nelenkov.blogspot.in/2012/11/sso-using-account-manager.html
在这方面的任何帮助将受到高度赞赏。