don't pause when app minimized(android)

hello i create a android pet feeding
i need when my cat is hungry play sound (like alarm) to …

my problem is it : if you minimized the app ,the app going to pause mode

is any way to solve this problem

This is by design to stop apps running the battery dry.
Look at this thread for a possible option.