1.Introduction
Description: Using this extension you can use user's App Data Folder of Drive.
Latest Version: 1
Released: 2021-06-17T18:30:00Z
Last Updated: 2021-06-17T18:30:00Z
Permissions: android.permission.READ_EXTERNAL_STORAGE,android.permission.WRITE_EXTERNAL_STORAGE,android.permission.GET_ACCOUNTS,android.permission.MANAGE_ACCOUNTS
Note: You may not need to ask any of the above permission
2.Blocks
3.Documentation
Events
FolderCreated | Event invoked after creating folder and returns the newly created foder's idfolderId | text |
FileUpdated | Event indicating that file has been updated and returns the file's idfileId | text |
FileUploaded | Event indicating that file has been uploaded and returns the file's idfileId | text |
FileDeleted | Event invoked after 'DeleteFile' method with result which will be either true(boolean) or the error messageresult | text |
FileDownloaded | Event indicating that file has been downloaded and returns the file's pathfilePath | text |
AuthSuccess | Event indicating that authentication was successful and returns the necessary credentialsdisplayName | text email | text photoUrl | text |
AuthFailed | Event invoked when authentication fails and returns the error messageerrorMessage | text |
GotFilesList | Event invoked after getting files list which is a dictionary having file name as key and id as valuefiles | dictionary |
GotError | Event invoked in most of cases when an error occurs and provides the error messageerrorMessage | text |
GotFileInfo | Event invoked after getting file's info as a dictionaryinfoDictionary | dictionary |
Methods
IsAuthorized | Returns whether user has signed in and granted access or not. It must be called before using any other method except LaunchAuthFlow. |
LaunchAuthFlow | Launches auth flow to get access from user |
RevokeAccess | Revokes access and signs out the user |
SignOut | Signs out the user from app |
UploadFile | Uploads files to specified folder,if folderId is empty then uploads to root of app data folderfolderId | text filePath | text |
DownloadFile | Downloads specified file to the given pathfileId | text downloadPath | text |
DeleteFile | Deletes the specified filefileId | text |
GetFileInfo | Gets info of given folder/file from its idfileId | text |
CreateFolder | Creates folder in parent folder (App Data Folder if set to empty)parentId | text folderName | text |
ListFiles | Lists files present in specified folder with given filter i.e. includeFoldersfolderId | text includeFolders | boolean |
UpdateFile | Tries to update the already existing filefileId | text newFilePath | text newMetadata | dictionary |
4.Purchase Extension
PayPal:
UPI:
vknow360@apl
5.How does extension work?
Get Access to App Data Folder of User's drive
First of all to access a google service we need credentials from google (will be discussed next) and consent from user.
This is how we get consent from user:
Since all the authentication happens by Google Sign In activities so app/extension will be able to access data which was granted by user.
Scopes Requested
The extension works with App Data Folder so the only requested scope is DriveScopes.DRIVE_APPDATA
.
It does not allow any app/service to read/write files outside of the folder assigned to it by Drive.
However, there is no any other limit so app can do whatever it wants with that specific space.
Create OAuth Client for your app
To get Google verify your app to use Drive you need to register your app in Google Console, for which steps are given here: GitHub - mesadhan/google-drive-app: Google Drive API with Android
Is it safe?
Yes, app/extension will not request for any sensitive data.
It gets following information, on the consent of user:
- display name
- photo url
These are usually public for a Google Account
6.Demo Video
Hope it helps!