Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Meinzelmaenchen · Aug 15, 2014 at 08:36 AM · androidgoogleaccessscopedrive

Google Drive Plugin - full access from android device

Hello,

I'm using the "Google Drive for Unity3D plugin" from the forum. What I want to do is, that the user can upload a file with his browser on his pc to Google Drive. Then I want to download this file on an android tablet.

I think that means that the App needs full access to google drive. Therefore I added the scope "https://www.googleapis.com/auth/drive" in "GoogleDriveAuthorization.cs". In the Edtior everything works fine and I can download the uploaded files.

But on a real android device it doesn't work. The initialization/authorization works. It's also possible to upload and download a text file which has been created by the app (like in the sample code). But if I search for the other files, which have been uploaded with the browser, nothing is found.

My assumption is that my app hasn't got full access to Google Drive and beacause of this the files which haven't been created by the app, can't be found.

What do you think? How can I solve this?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Meinzelmaenchen · Aug 18, 2014 at 10:10 AM

I found a solution. Thanks to "midworld" for the help!

Android doesn't use web browser based method for authorization. You have to modify the plugin itself.

Go to the file "unity-googledrive / NativePlugins / Android / GoogleDrivePlugin / src / com / studio272 / googledriveplugin / GoogleDrivePlugin.java"

Here you can modify the permissions:

 credential = GoogleAccountCredential.usingOAuth2(activity,
 "https://www.googleapis.com/auth/drive.file",
 "https://www.googleapis.com/auth/drive.appdata");

Replace the new "googledriveplugin.jar" in "unity-googledrive / Assets / Plugins / Android" and it should work.

Maybe it helps, if some has the same problem :)

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image JustARabbit · Jun 28, 2015 at 01:06 PM 0
Share

I tried what you described above but I am still having trouble getting all my files on Android. With logcat I was able to see that I was authenticated with the correct "https://www.googleapis.com/auth/drive.Drive@" scope, however it doesn't return any files. Any suggestions or help would be much appreciated.

avatar image
0

Answer by JustARabbit · Jun 30, 2015 at 11:05 AM

Actually this definitely works. My problem was that my query string was too long. It was giving me correct a response without any of the files.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

GoogleMobileAds: As soon as I add my real banner ID, it stops working. 0 Answers

Artifacts while using google vr sdk 1 Answer

Get vertical FOV of Google Cardboard stereo camera 0 Answers

Build in Gradle 0 Answers

Firebase Invites System.AggregateException 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges