Read/Write files from OneDrive using FilePicker API

Help Request

Hi,

I want my app to read/write an SQLite database that is hosted on OneDrive.

However, testing with a simple text file has shown that it will write to the file (as in calls successful, cannot validate data is written) but is not shown in onedrive app or all other synced devices.

Has anyone got OneDrive support working fully on MAUI - specifically Android at this time.

NOTE: My debugging is on a real physical device that uses OneDrive daily (KeepassDX)

Any tips, notes, 3rd-Party libraries would be appreciated.

Posted Aug 14, 2022, 9:35 AM UTC

17
FluxyDude•

It is worth mentioning this is highly problematic, u may be better off syncing a folder down using your typical onedrive service and place the sqlite in that folder.

2
The_Kemo•

I think you should explore the Microsoft Graph API

1
wayne_matherOP•

I wanted something easier for end users. As I just wanted to use the installed onedrive application instead of having to go down the road of API integration and storing credentials.

1
Critical-Shop2501•

This is a .NET MAUI subreddit which is focused on visual element development. You’d be better served by the community by posting in a more appropriate subreddit.

0
BurkusCatMOD:maui: .NET MAUI•

I think the .NET MAUI subreddit sense for posts that are UI/visual related and for posts that are more service/native integration related. Both of things are .NET MAUI related.

Do you have any ideas of communities that would be better suited for this post?

3
Critical-Shop2501•

Ok. Felt it was a bit off but happy to be guided otherwise

1
wayne_matherOP•

I am asking question is specific to MAUI and/or Xamarin technically.

While it maybe a generic .NET question, I don't want to store credentials and consume OneDrive directly. I just wanted to use OneDrive if it was already installed on the users device and consume the file like any other file (which is not working as expected).

If it was a personal app, then sure I don't mind going the complicated way. But it looks like it actually might be easier to just run up an API endpoint than consume something over OneDrive/DropBox.

1