SOLVEDI got the ClientID and secret code, using option 'other', because android option won't give me a secret code.
Connection is successful, but I can't create a folder, I have this in the log
Asking for authorization from user.
Authorization granted by user.
No Access token
Send a request for a new Access token
New Token was created
Token is not correct. Try to refresh.
Error Message : Forbidden
Refresh Token
Create Folder
Forbidden
Refresh token done
What I'm doing wrong?
GoogleDrive.Initialize(Me, "Drive", clientId, clientSecret)
Compiling generated Java code. Error
Cannot find: C:\Program Files\Anywhere Software\Basic4android\libraries\webviewxtended.jar
Go to Credentials-> Create -> Oauth IDHi all, can someone provide a step by step on howto obtain client I'd and secret I'd to use this library?, I'm trying, but with no success on Google console. Thanks a lot.
Thanks, @Erel, now it works properlyBased on the error message this library depends on WebViewXtended library: https://www.b4x.com/android/forum/threads/little-webview-extension-v1-20.13705/#content
Hi Davfla,
Thank you for lib. I can upload the files in the root directory of google drive, but can not upload files in sub directories.
I am using the field DriveFolder
clsDrive.UploadFile ("xxxxxxx", "xxxxxxx", "xxxxxx", "drivedir", "")
Maurizio
DELETE https://www.googleapis.com/drive/v2/files/0B5LqWVCwfFwvdmFNejNnMkhkajg?key={YOUR_API_KEY}
GET https://www.googleapis.com/drive/v2/files?key={YOUR_API_KEY}
POST https://www.googleapis.com/drive/v2/files/0B5LqWVCwfFwveEo0MGh2eUdTams/copy?key={YOUR_API_KEY}
POST https://www.googleapis.com/drive/v2/files/0B5LqWVCwfFwveEo0MGh2eUdTams/trash?key={YOUR_API_KEY}
' ##### This is the Sub Added #####
Sub SearchTheFileList
ProgressDia(True, strTEXT_WAIT_Filelist)
FileListResult = ""
GetFileList.Initialize(Me) : GetFileList.Tag = "GetFileList"
Log(DriveListLink & "?access_token=" & myAccessToken & "&q=trashed+%3D+false+and+title%3D%27"& mySearchingFilename &"%27&maxResults=" & MaxResults)
GetFileList.Download(DriveListLink & "?access_token=" & myAccessToken & "&q=trashed+%3D+false+and+title%3D%27"& mySearchingFilename &"%27&maxResults=" & MaxResults)
End Sub
'##########################
'Searching on Google Drive for a file with the filename. If founded the function returns the file ID, otherwise it returns ""
'This can need a lot of time if many files storage on Google Drive.
'If more than one file with the same filename found, the first result will return
'
'Event : FileFound(ID as String)
Sub SearchForFileID(Filename As String)
IsSearchingFilename = True
mySearchingFilename = Filename
' ShowTheFileList
SearchTheFileList '<- CALL
End Sub
Seems like the lib does load the complete file into memoryWhat is the problem ?