![]() 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. If you have extra questions about this answer, please click "Comment". If the answer is the right solution, please click " Accept Answer" and kindly upvote it. QUESTION: How to correct str Path, FILE READ sourse and PLAYER sourse that app works. If your application is not these types and request this permission, your application will be rejected by google play store. PLAYER sourse: /storage/emulated/0/downloads/do-not-delete/myfile2.mp3. this permission is designed for apps requesting access to the all files access permission, intended and permitted use includes file managers, backup and restore apps, anti-virus apps, and document management apps. ![]() Yes, have a workaround, but I do not recommend to request MANAGE_EXTERNAL_STORAGE permission. Is there a workaround that I can use to keep using this path, ![]() Yes, please save your files to internal path like using FileSystem.AppDataDirectory instead of Android.OS. from Xamarin Essentials: File System Helpers Or do I need to create a new path structure? Yes, if you set the target framework to the Android 10 later, this android:requestLegacyExternalStorage not work, Please see Storage updates in Android 11. Is there a workaround that I can use to keep using this path, or do I need to create a new path structure? Creating a new path would be problematic for interactions with older versions of the app, but provided I can still access it if it already exists, I can probably make a wrapper to migrate the files in future versions of the app. Sadly it seems that this workaround no longer works, and I can't create the folder, or files in this location anymore. To make this work on Android 10+ I've added the following line to the AndroidManifest.xml android:requestLegacyExternalStorage="true" NOMEDIA in save path" + Environment.NewLine + ex.Message) NomediaFile = Path.Combine(filePath, ".NOMEDIA") ĭebug.WriteLine("Error creating. Using the combined paths, create the nomedia file for that folder. Var filePath = Path.Combine(Android.OS., StringTools.GetStringResource("szSaveFolder")) ĭebug.WriteLine($"SaveAndroid.cs->GetSavePath():") Public async Task CreateSavePath(string path = null) Hello, I have been using this code to create and use a directory for storing my files, and reports.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |