OK, I've done some exploring with multiple profiles and here's what I can make out:
On Android 9 (and presumably lower) there is a trick that works for me to share a single set of book files across profiles, thus avoiding the need to have duplicate copies of those files for each profile. It seems to be a hole in the profile sandbox implementation that Google left open up to Android 9, but appears to have been closed after that (in Android 10 the trick does not work for me). Whether the trick works for FireOS 7 or not I don't know, but since it is based on Android 9 it might. So I'll describe it here in case you want to try it:
The obb folder seems to be the mechanism that older Android versions used for sharing files across profiles. Google appears to have disabled that (probably only for non-system app is my guess) as of Android 10, but it might still work prior to that.
Hopefully some of that information might help.
Karl
- Most of my exploration was done in Android emulators, so it may not match exactly what you will experience in FireOS. FireOS 7.3.2.7 is supposed to be based on Android 9, however, so I suspect that the behaviour I see in the Android 9 emulator should match what you will see.
- Each profile has it's own "sandbox" area in primary storage that it has access to. In this way, each profile is isolated from others so that any customization (most anyway - there are some exceptions which I won't get into here) are unique to that profile and don't impact any other. That isolation includes all files visible to the profile, not just files private to individual apps.
- As I alluded to in my last post, secondary profiles don't have access to the SD card. This might be controlled by device manufacturers though, so may not be universally true. In the emulators (and in the physical devices I've tried), I had no access to SD card data from non-system applications in anything other than the primary profile.
- All of the above means that a secondary profile won't have access to book files that are stored in the primary profile "sandbox". In order to make book files visible to secondary profiles, you'll need to copy those files to the secondary profile sandbox.
- When you connect your device to a PC via USB, the PC exposes the primary storage area as a drive for the active user profile (and only one profile can be active at a time). So to load books into the secondary profile sandbox, you should switch to that profile (making it active) and then connect. The drive exposed on your PC will be the sandbox for that profile. If you copy book files there, they should be visible to the secondary profile on your device. Of course that means you need to have multiple copies of books files on your device, one for each profile, which means you'll eat up more storage.
On Android 9 (and presumably lower) there is a trick that works for me to share a single set of book files across profiles, thus avoiding the need to have duplicate copies of those files for each profile. It seems to be a hole in the profile sandbox implementation that Google left open up to Android 9, but appears to have been closed after that (in Android 10 the trick does not work for me). Whether the trick works for FireOS 7 or not I don't know, but since it is based on Android 9 it might. So I'll describe it here in case you want to try it:
- With the primary profile active, navigate to folder /Android/obb. If the folder does not exist, create it. You should be able to do this through the PC while connected through USB or on the device using a file manager app.
- Copy book files into this folder. You can create sub-folders to organize the files if you want.
- Switch to the secondary profile. In the secondary profile you probably won't see the same /Android/obb folder automatically (I didn't anyway), but you can create one. Once created, the folder seems to get linked to the same shared folder used by the primary profile so any book files you copied there while that profile was active should "magically" appear in the new /Android/obb folder you just created in the secondary profile.
- You should be able to scan that folder in my app now (after adding an appropriate root folder of course).
The obb folder seems to be the mechanism that older Android versions used for sharing files across profiles. Google appears to have disabled that (probably only for non-system app is my guess) as of Android 10, but it might still work prior to that.
Hopefully some of that information might help.
Karl