How do you know if an app is running in background?

Hello.
from my app, i start an other one witch directly goes to background (it's an app from playstore) but this app can be already running so i need to know if this app is running in background to prevent to start it again...

so how can i know if an app is running in background ?

So you want to know when external app that is on user's device is functioning in background as a service?

yes exactly

There exists no extension that can fulfill that requirement as of now, would you like to sponsor one?