I have been using rp.getsafeDirDefaultExternal successfully for some time as it allows me to exchange sql db files in and out of a device.
Specifically, I have used it to:
1. allow a user to email his .db file to a second device so that the two are synced.
2. allow the user to email the file to his computer and store it on that device so that it can be sent back to his android device if necessary to restore.
This was all possible as the file was visible in 'internal storage', 'android', 'data', 'b4a.myappname', 'files', 'mydir'. The file could be replaced as necessary by moving it from the download directory to 'MyDir'.
As of Android 11, the 'Android', 'data' files are now invisible, so these techniques are no longer feasible.
I have been looking for a solution and Erel's latest forum post:
has reminded me of the drum-beat I have been seeing related to doing away with all file locations except for file.dirinternal.
I have tested file.dirinternal and confirmed (again) that I can't see it on my device so that it doesn't seem I can use it in the same way I have been using it.
I do have workarounds for my two uses in the form of:
1. I have sync logic using bluetooth.
2. I could use the android cloud based backup.
My questions:
1. Is there any work-around for seeing my files in Android 11?
2. Is there any other option for initializing a file that can be 'seen' using the standard 'my files' app in android?
3. For the purpose of backup, is there a preference for the cloud based backups offered: (Samsung, Google, etc.)
Thanks for any ideas, Cliff McKibbin
Specifically, I have used it to:
1. allow a user to email his .db file to a second device so that the two are synced.
2. allow the user to email the file to his computer and store it on that device so that it can be sent back to his android device if necessary to restore.
This was all possible as the file was visible in 'internal storage', 'android', 'data', 'b4a.myappname', 'files', 'mydir'. The file could be replaced as necessary by moving it from the download directory to 'MyDir'.
As of Android 11, the 'Android', 'data' files are now invisible, so these techniques are no longer feasible.
I have been looking for a solution and Erel's latest forum post:
Flow chart to help choose folder
This flow chart will help you choose the folder in all kinds of different cases: There were reasons to use other folders in the past. Those reasons are no longer relevant, mainly due to new restrictions in Android. Other options to access local and remote files...
www.b4x.com
I have tested file.dirinternal and confirmed (again) that I can't see it on my device so that it doesn't seem I can use it in the same way I have been using it.
I do have workarounds for my two uses in the form of:
1. I have sync logic using bluetooth.
2. I could use the android cloud based backup.
My questions:
1. Is there any work-around for seeing my files in Android 11?
2. Is there any other option for initializing a file that can be 'seen' using the standard 'my files' app in android?
3. For the purpose of backup, is there a preference for the cloud based backups offered: (Samsung, Google, etc.)
Thanks for any ideas, Cliff McKibbin
Last edited: