Xamarin Android Scoped Storage for External storage

Laszlo Alt 11 Reputation points
2020-12-06T20:50:54.157+00:00

Since setting our targeted Android version to 10 and switching to AndroidX libraries, we have been on the search for a proper Xamarin example showing scoped storage writeup for (read/write/replace) when dealing with images using the MediaStore. Only thing I can find is Android Java/Kotlin examples on the Android site. Best documentation I found so far is https://developer.android.com/training/data-storage/use-cases and https://exceptionshub.com/java-how-to-save-an-image-in-android-q-using-mediastore.html but not specific to Xamarin Android. The Xamarin Essentials plugin does not have anything with external storage from what I can tell. Has anyone already written a plugin for this or have a write up (article/blog) somewhere by any chance?

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

1 answer

Sort by: Most helpful
  1. JessieZhang-MSFT 7,706 Reputation points Microsoft Vendor
    2020-12-07T08:04:10.21+00:00

    Hello,

    Welcome to our Microsoft Q&A platform!

    For this, you can check the official document External storage.

    This guide will discuss the concepts and APIs in Android that are specific to external storage.

    And there is a sample about this, you can check it here: Xamarin.Android Local Files sample on monodroid-samples .

    Hope it can help you.

    Best Regards,

    Jessie Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    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.

    0 comments No comments