I have written an app and it works. The app store all results at this time in the ASD of the app (Android 11).
Now i want give all the users of the app a chance to backup the results in their own google drive and a chance to restore the data back to the app.
The app should create a directory with the name of the app and inside 2 files (a database file and a zip-file) copied from the ASD in the users google drive.
Is there a extension, that will work for me? Can anyone help me to do this?
In Companion Auth works properly. I will test it in my app later.
Here my first question:
I use the call "GetRootFolders" and can see a result in the WebViewer.
How can I use "GotRootFolders" to query whether a folder already exists in the root?
Example: I want to know if the "Testapp" folder exists in the root?
Apart from authentication, you should not need to view the webviewer.
The output of getRootFolders is returned to the webviewstring, you can then use the JSON.parse block in the extension to convert the output to a list. You can then check if "Testapp" exists in the list.
you wrote that the folderID is also given in the stringified JSON array. How can I read out the folderID for my folder name "Testapp"?
Can you please show me a block for that too?
I definitely need this folderID for the TargetID in "UploadFileToFolder", correct?
The targetID is the Id of the folder you wish to upload the file to. You use the folderID for this. Therefore if you want to upload a file to the folder "Testapp", you must get this folders ID and set it as the targetID.
Also, you can debug all of your variables to ensure that they are correct - e.g. do you actually have a base64string, is the filename returning true, is the target folderID in place