I intend to save the database on an external support maybe even an sd. in order not to lose the changes made up to that point especially in case of reinstallation.
Then I could make the database put it in DirInternal and if eventually the user wants to make a copy, maybe he does it on a sd (I have to give him some possibilities).
Then I create the folder that will contain the Photos / songs in a folder in DirRootExternal, which at the time the app is uninstalled will remain on the device and if he wishes he will delete them. It could be an idea ?
What you are asking is : How can I backup all the data (Photos/Songs , DB, etc so that if the app user reinstalls the app no data is lost and the user can carry on where he left off.
What you need to consider is why would the user reinstall your app ? Reinstalling mostly happens when a user upgrades to a new device, either because he wants a newer phone or his previous phone was lost /stolen. Either way your backups onto internal memory of the old device are not going to be of much use.
OliverA suggested you try Android Auto Backup for apps, and this could be a good solution, but I haven't seen any project in the forum that has implemented it so you'll have to try to get to work by yourself. ( Maybe Erel can come up with a small demo project that implements Auto Backup to help the less experienced ) However Auto Backup is oriented towards storage of user data , not files like jpeg, mpeg, or pdf. Actually it will work with these and most other files, the problem is the cloud space allocated is 25 MB , so with jpeg and mpeg etc you're going to run out of space fast. Apart from this Auto Back is a great solution for data like DBs and user preferences, because it is fully automated , and does all the work by itself in the background without annoying the user, and if he upgrades to a new device and reinstalls all the old data is there like nothing happened.
I have this exact problem with an app I'm working on, it's a business app and can end up holding 100-200 pdf files, which the user CANNOT lose no matter what happens, so my app must backup data twice daily , and it must be to some place other then the users device, so in case of loss or theft all the data and documents are retrievable. This can be done to the users google cloud storage which every android user gets for free (15Gb if I remember correctly) However I found no way to automate the backup process to Google Cloud Storage, it would have to be done manually every day by the user, and that is not really a good option. This would be the best solution by far if I could get the process fully automated.
In the meantime the solution I have is a backup app, which is a second app the user can download to another device and which basically acts as a backup server. It takes one minute to configure the server app , then two apps connect twice a day and the backup process executes fully automated with no hassles for the user . The biggest hurdle here is that you need one device to know the IP address of the other , and with dynamic IP they will periodically change . So you every time the IP address changes you need to let the other device know what the new IP is . But that's another story ...........?