How to share app-specific directory to other (my) apps

Viewed 15

I want to share app specific directory(/data/data/packageName/files/target) and its children to other (my) app.
These are my scenarios and conditions.

  • App A creates and downloads random files on /data/data/packageA/files/target
  • App B wants to retrieve and delete /data/data/packageA/files/target recursively without user interaction. (SAF is not an option)
  • All apps are mine.
  • Shared storage(ex. /emulated/0/Documents etc) is not an option.
  • sharedUserId using createPackageContext works perfect for me, but it is deprecated.

Is there any solution to solve this problem?

EDIT: I'm looking for the way not to manage nor inspect every files creating structed data like StorageProvider Sample. I wish App B could access files dynamically with only root directory (target in this example)

0 Answers
Related