Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Store data into google drive's backup tab instead of drive folders

I need to implement same thing like whatsapp storing all chat history to google drive on clicking on backup button in app. And same restore it in new device as required.

I have look for below references for implementing this, but some how I was not able to do it successfully.

https://developer.android.com/guide/topics/data/backup.html

https://developer.android.com/guide/topics/data/data-storage.html

https://developer.android.com/guide/topics/data/data-storage.html#db

Will this data backup option will help in my requirements or I need to do something else?

I successfully developed the file upload to google drive folders, but i need that data in the backup tab of google drive with app name.

can any one guide me how I can implement this or provide me some references?

Thanks in advance..!

like image 922
Er.nishka Avatar asked Jan 25 '18 05:01

Er.nishka


1 Answers

You may refer with this documentation. The Google Drive API includes a special hidden folder that your app can use to store application data.

Note: This feature now uses the alias appDataFolder in place of appdata and appfolder.

To be able to use your Application Data folder, request access to the following scope:

https://www.googleapis.com/auth/drive.appdata

For more information about scopes and how to request access to them, see Authorizing Your App with Google Drive.

like image 168
abielita Avatar answered Nov 07 '22 11:11

abielita