Google Photos is able to restore your file to an album even if you rename it despite the photo not being in that directory.
To make this possible one could use a FileObserver
, but since you can't have a service run indefinitely how would you be able to realise a rename operation on a directory that happens when your application isn't in use.
The other option would be to generate an ID for the directory that remains consistent irrespective of a rename, but how?