I recently had to update my app to fix some issues with dropbox. Since being forced to target SDK 30 from 28, I've fallen foul of no longer being able to access File.DirExternal. My long time users have always had their data stored in a folder under File.DirExternal, which is no longer accessible by the app on Android 11 or later.
Is there any way to access this folder to at least migrate their data to RuntimePermissions.GetSafeDirDefaultExternal? I can't rollback to the previous release now and most of my users aren't savvy enough to manage copying the folder manually to the new location on the device to access their data.
Obviously new users can just use the new path.
I've tried the External Storage library, but get the error below when compiling as soon as the lib is added to the list (I've included ContentResolver and JavaObject libraries as well as #additionalJar com.android.support:support-core-utils).
I couldn't get the 'SaveAs' code to work. It only offered me google drive or my downloads folder, and wasn't really of much use as it requires intervention for each save.
Has anyone got any suggestions as to how I can continue to use this folder or migrate data to a new one under GetSafeDirDefaultExternal without user intervention?
Is there any way to access this folder to at least migrate their data to RuntimePermissions.GetSafeDirDefaultExternal? I can't rollback to the previous release now and most of my users aren't savvy enough to manage copying the folder manually to the new location on the device to access their data.
Obviously new users can just use the new path.
I've tried the External Storage library, but get the error below when compiling as soon as the lib is added to the list (I've included ContentResolver and JavaObject libraries as well as #additionalJar com.android.support:support-core-utils).
B4A Version: 11.50
Parsing code. (0.14s)
Java Version: 8
Building folders structure. (0.01s)
Compiling code. Error
Error compiling program.
Error description: Current declaration does not match previous one.
Previous: {Type=files,Rank=0, RemoteObject=False}
Current: {Type=Object,Rank=1, RemoteObject=True}
Error occurred on line: 46
Dim files() As Object = Folder.Native.RunMethod("listFiles", Null)
I couldn't get the 'SaveAs' code to work. It only offered me google drive or my downloads folder, and wasn't really of much use as it requires intervention for each save.
Has anyone got any suggestions as to how I can continue to use this folder or migrate data to a new one under GetSafeDirDefaultExternal without user intervention?