Xamarin Forms Application.Current Properties Backup on user Google Drive account

I want to store my Application.Current.Properties to user's Google Drive Account as backup via Google Drive REST API v3. And Sync functionality from App to Drive and vice a versa.

I have searched and found very little info about it. But unable to take start as I am a newbie in using the user's Cloud storage.

So can anyone guide me how to achieve this? No such documentation or video tutorial found to do it from scratch. I need help.
Thanks in advance.

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai

    Application.Current.Properties is a special dictionary for persisting data. You can follow this blogs to store it to the Google drive.
    Then when you retrieve it from drive, reset your current properties like:

    // the StoredData is getting from drive
    Xamarin.Forms.Application.Current.Properties.Clear();
    foreach (KeyValuePair<string, object> keyValue in StoredData)
    {                    
        Xamarin.Forms.Application.Current.Properties.Add(keyValue);
    }
    
  • FahadAliQureshiFahadAliQureshi Member ✭✭

    @LandLu said:
    Application.Current.Properties is a special dictionary for persisting data. You can follow this blogs to store it to the Google drive.
    Then when you retrieve it from drive, reset your current properties like:

    // the StoredData is getting from drive
    Xamarin.Forms.Application.Current.Properties.Clear();
    foreach (KeyValuePair<string, object> keyValue in StoredData)
    {                    
        Xamarin.Forms.Application.Current.Properties.Add(keyValue);
    }
    

    The link of the blog you shared, that post is outdated as the author mentioned in his comments. I am trying to find out the updated Google Drive REST API v3 method to achieve the goal. And yes from scratch. :smile:

    So can you guide me @LandLu ?

Sign In or Register to comment.