简体   繁体   English

授权Android Google Drive API

[英]Authorizing Android Google Drive API

i have implemented Google Drive API in my Android app. 我已经在Android应用中实现了Google Drive API。 But when i am using it with new Account i need to Authorize / i need to open a popup which will show Emails configured in that my mobile and user need to choose in which Email Dive account photos should be uploaded. 但是当我将其与新帐户一起使用时,我需要授权/我需要打开一个弹出窗口,该弹出窗口将显示配置的电子邮件,我的手机和用户需要选择应在其中上传电子邮件潜水帐户照片的位置。

But my Necessary is to store all users Photos in one Google Drive. 但是我需要将所有用户的照片存储在一个Google云端硬盘中。 and they should not give any autherizations . 并且他们不应该提供任何授权。 It should code wise automatically authorize to my account and start upload photos to my Account. 它应该在代码上自动自动授权给我的帐户,并开始将照片上传到我的帐户。 Is it possible. 可能吗。 if possible please any one Help me. 如果可能的话,请任何人帮助我。

Thanks in Advance. 提前致谢。

Users can only authorize your app to request their Google Drive on their behalf; 用户只能授权您的应用代表他们请求Google云端硬盘; hence this code wise automatically authorize to my account is not possible at all. 因此,完全无法使用此code wise automatically authorize to my account

But once they authorize your app, you don't need to show the newAccount pop up every time; 但是,一旦他们授权了您的应用,您就不必每次都显示newAccount弹出窗口了; you can use the same access token returned during authorization to upload photos to the drive for the selected account. 您可以使用授权期间返回的相同访问令牌将照片上传到所选帐户的驱动器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM