java – How can I achieve persistent folder monitor even efter phone restart?

I’m developing an app and I have a folder named “Test”, my goal is to use FileObserver and watch said folder for new files.

I want to continue to watch the folder even after the app has been closed or the phone hash restarted, what would be the best approach to achive that?

Thank you!