i need to detect of an onother appcliaction is open or closed

is there a way to know this

if yes please help me