I’m hoping someone can provide a code snippet to show how to export my Android app’s SQLite3 database to the Download or Documents directory on the phone. I’m wanting Android 13 and Java (11). I’ve seen some partial snippets on developer.android.com, but they are incomplete and worse, use methods that are now deprecated (for example, they use startActivityForResult whereas that is deprecated in favor of Activity Results). Google and ChatGPT’s results for pages not named developer.android.com are using code that was made obsolete after Android 10 (IIRC).
So, can someone please show me how to accomplish this please? This is a personal app, so the source and destinations can be static, and I don’t care whether the destination directory is Documents or Downloads.
TIA