Is there a public Android 10 directory from which my app can import user-generated files?

Axiixa 21 Reputation points
2022-02-17T23:37:34.267+00:00

My app takes user-generated .CSV files as input. Since Android 10 and the use of Scoped Storage I am not sure where these files can be placed by the user so my app can import them. Because my app-specific directories are not user-accessible from a file manager and my app can't see outside of its own directory how would this work? Any help anyone can provide would be greatly appreciated!

Developer technologies | .NET | Xamarin
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2022-02-18T02:28:10.363+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    What is your target framework version in Android?

    If you target framework version is Android 10.0 API 29, you can set android:requestLegacyExternalStorage="true" in the <application> tag of AndroidManifest.xml.

    If you target framework version is android 11 API 30 or later, you can not use android:requestLegacyExternalStorage, you need to use storage access framework, let users to browse and open documents, images, and other files across all of their preferred document storage providers.

    And if want to add MANAGE_EXTERNAL_STORAGE permission. it is not recommended except your application in this list.

    Here is a Storage document in android, you can refer to it.

    Best Regards,

    Leon Lu


    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.