I want to make an android app which can run in the background with UE4, how do I do it?

For example, I make a loop counting 1+1+1+1+1…

and I don’t want it to stop counting when I press the home key and not focusing on this app anymore.

How can I do it? Are there any plugins or methods to make it work?