(android) Did you ever found a solution for some regular background activity?

(on android) I’m trying to make an app that does something every x minutes, even when the app is in the background and/or the screen is turned off… tried backgound-mode plugin but it only works reliably when the phone is plugged in… did you ever found a solution to this? Thanks in advance!