Xamarin Forms take backup and restore sqlite from Google Drive

Gopidhas, Sidharthan 1 Reputation point
2022-04-19T13:32:50.66+00:00

Hi ,

I need take backup sqlite from Xamarin Forms iOS application and store it into google drive. Same thing I want to restore sqlite from google drive to my xamarin forms iOS application.

How it to do ?

Any good nuget pacakages available with example ?

Give me example how achieve this >

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,326 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 39,391 Reputation points Microsoft Vendor
    2022-04-20T02:28:56.037+00:00

    Hello,

    In fact, the Nuget Package is just not support goole authentication on ios/Android, you could use Xamarin.Auth to implement this part of function.

    You can refer to .NET quickstart and Google Sheets API to get the sample about how to use REST in C# and REST API reference.

    Here is the sample code that I've tested.

    195020-viewmodel.txt

    195101-driveservicehelper.txt

    In addition, don't forget to add the following code into your MainActivity:

       global::Xamarin.Auth.Presenters.XamarinAndroid.AuthenticationConfiguration.Init(this, savedInstanceState);  
       global::Xamarin.Auth.CustomTabsConfiguration.CustomTabsClosingMessage = null;  
    

    Also, you need to create a activity: 195102-activitycustomurlschemeinterceptor.txt

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.