I am developing an Android Application that is supposed to auto-upload images as soon as they appear in the Media Store. For this, I have implemented a Content Observer which is registered inside a Foreground Service to constantly monitor the change in Media Store and there is an upload Service which is triggered onChange() of Content Observer. I am considering not using the Foreground Service as it wastes a lot of resources, what would be the best way to implement this?
P.S. - I have considered using scheduled Service too, but that wouldn't be of that help.
Thank You.