I need to run a code in an Android App every 5 minutes even if the app is in background. I dont know much about android studio, like where to put the code, and how to properly do it to avoid crashes and diferent errors when is in the background.
The app is a webview that extract and Id from the JS from the site code and then I need to run a script with that ID every 5 minutes.