I'm developing an App that is distributed by manual install on industrial Android devices with a barcode reader, Zebra TC21 and TC52. Devices are Android 10 and 11, app targets Android 10, with requestLegacyExternalStorage=true.
It has in the files folder of the private external storage some log files, and its SQLite db. The App works on all the devices, and in almost all of them I can connect the devices via USB and access the folder:
Here's when I open the data folder:
My problem is that on some devices, same brand and OS version, brand new taken out of the box and app installed, when I open the data folder, the list is much shorter, and my app is not listed. But the app is installed and works, the DB is there and probably the log files. But I'm unable to access them via USB from Windows.
I've temporarily modified my App to save DB and logs in a public folder, and I can see it in all the devices. But still wondering why on some I can't access my app in the private folders.
Another question related to storage: soon all the devices I work with will have Android 11, if I target it, I understood I won't be able anymore to save data in the external storage. If I still want to give the possibility to easily access to log files via USB, where should I store them? This is not a PlayStore distributed app, is for clients that install it manually.
UPDATE
From the comments I understands there's a misunderstanding: the App itself works and has no problems writing to the private external storage, with both Android 10 and 11. My problem is that on some devices, when I connect from Windows 10 via USB and browse the sdcard/Android/Data folder, I can actually access my App folder and view my logs. On some other devices, I can't find my app folder in the sdcard/Android/Data folder. I'm trying to understand why is that.
Thanks