Cebuvi Active Member Licensed User Longtime User Nov 11, 2020 #1 Hello, I have developed an app that allows the user to generate and save pdf, jpg and xls files so that he can later access them and use them with other applications. For that I create a directory in DirExternal and access it through PERMISSION_WRITE_EXTERNAL_STORAGE. With API 29 I had to add in the manifest SetApplicationAttribute(android:requestLegacyExternalStorage, true) Click to expand... , but it is possible that with API> 29 this will not work. I would like to know what is the best solution to save these files without having problems with future Android updates to be able to work on it. Thank you very much.
Hello, I have developed an app that allows the user to generate and save pdf, jpg and xls files so that he can later access them and use them with other applications. For that I create a directory in DirExternal and access it through PERMISSION_WRITE_EXTERNAL_STORAGE. With API 29 I had to add in the manifest SetApplicationAttribute(android:requestLegacyExternalStorage, true) Click to expand... , but it is possible that with API> 29 this will not work. I would like to know what is the best solution to save these files without having problems with future Android updates to be able to work on it. Thank you very much.
Erel B4X founder Staff member Licensed User Longtime User Nov 12, 2020 #2 1. You can save the file in RP.GetSafeDirDefaultExternal. File managers will be able to access this folder. 2. You can share the file from your app directly. See FileProvider example. 3. You can make your app a picker app: https://www.b4x.com/android/forum/t...om-your-app-with-file-provider.70458/#content Upvote 0
1. You can save the file in RP.GetSafeDirDefaultExternal. File managers will be able to access this folder. 2. You can share the file from your app directly. See FileProvider example. 3. You can make your app a picker app: https://www.b4x.com/android/forum/t...om-your-app-with-file-provider.70458/#content
Cebuvi Active Member Licensed User Longtime User Nov 12, 2020 #3 Thanks for the reply. Is it foreseeable that these solutions will not have problems with future versions (30,31) of the API? Upvote 0
Thanks for the reply. Is it foreseeable that these solutions will not have problems with future versions (30,31) of the API?
Pendrush Well-Known Member Licensed User Longtime User Nov 12, 2020 #4 Cebuvi said: future versions (30,31) of the API Click to expand... Storage updates in Android 11 | Android Developers Android 11 introduces significant enhancements to external storage management, strengthening user data protection through improved scoped storage, new media file access methods, and refined permission models. developer.android.com Upvote 0
Cebuvi said: future versions (30,31) of the API Click to expand... Storage updates in Android 11 | Android Developers Android 11 introduces significant enhancements to external storage management, strengthening user data protection through improved scoped storage, new media file access methods, and refined permission models. developer.android.com
Cebuvi Active Member Licensed User Longtime User Nov 12, 2020 #5 Thanks Pendrush, very interesting but complex for me. I will have to study it slowly. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Nov 13, 2020 #6 Cebuvi said: Is it foreseeable that these solutions will not have problems with future versions (30,31) of the API? Click to expand... Yes. Upvote 0
Cebuvi said: Is it foreseeable that these solutions will not have problems with future versions (30,31) of the API? Click to expand... Yes.