midworld / unity-googledrive

Google Drive for Unity3D
Apache License 2.0
121 stars 28 forks source link

i want to change scope at android #21

Closed aromage closed 7 years ago

aromage commented 7 years ago

in unity C# project i add "https://www.googleapis.com/auth/drive" in drive.scopes string but not working

change native plugin and rebuild jar is only way to add scope?

midworld commented 7 years ago

Hello fireings, If you have a issue, the console shows error messages to you. Could you please check the log in Logcat or something like that? Thanks.

aromage commented 7 years ago

at sample project. i want to download (.xlsx) file already exist
only 1 .xlsx file in google drive

and i change code at sample project "drive.ListFilesByQueary" -> "drive.ListAllFiles" but (var list) and (var files) 's count is 0 so i can't download that file at android but using desktop project i can download that .xlsx file

i'd think android plugin's jar file's scope doesn't change in runtime code drive.scope = new string[] {"https://www.googleapis.com/auth/drive"} is not working at android

midworld commented 7 years ago

Oh, you're right.

I missed implementing that changing permissions in Android. If you want to change the permissions in Android, you should recompile JAR and replace it.

https://www.cs.utexas.edu/~scottm/cs307/handouts/Eclipse%20Help/jarInEclipse.htm

Thanks.

aromage commented 7 years ago

ty for your answer

and.... hmm... sry to more ask T .T

'native plugins -> android' is not eclipse project ... i opened the 'googledriveplugin.java' but eclipse can't cognize and compile

how open full java project of this plugin at eclipse? i have android sdk but "import com.google.android....." isn't cognized in "googledriveplugin.java"

midworld commented 7 years ago

I think you didn't install Google Play Service yet. Please install it by following page:

https://code.tutsplus.com/tutorials/android-sdk-working-with-google-maps-application-setup--mobile-15771

And you can import whole files of the project:

http://agile.csc.ncsu.edu/SEMaterials/tutorials/import_export/

I hope it would be helpful.

aromage commented 7 years ago

ty i just saw ur comment

it works! ty sincerely

i changed all of jar file because this project's google api jar version is so old...

so when i import google play service and google api. project have many errors

ex) usingoauth2(activity, string[]) -> usingoauth2(context, collection)

version up from 1.13.2-beta(this) -> 1.21.0 (google drive2)

ty ty

midworld commented 7 years ago

I am glad to hear!