title: How can I share a db file between 2 applications
body: <p>since <code>Enviroment.getExternalStorageDirectory()</code> is deprecated I have a little Problem. I have 2 applications (a lite and a pro version of an app). These apps have a database which I could export and import. When switching from lite to pro app, the user could import the &quot;old&quot; database into the new app. The database was stored under a folder inside his &quot;sdcard&quot;. But now on Android 12 devices we no longer have access to that External Storage.</p>
  <p>So how could I solve the problem?</p>
  <p>Cause I think, <code>context.getExternalFilesDir((Environment.DIRECTORY_DOCUMENTS)</code>
  doesn't work cause the namespace of both apps are different. And I guess it will not work to open a file which is not located under the namespace of the app the file is requested.</p>