How to detect if another app is opened

Please I need help on how to detect if another app is opened/running
For e.g, if youtube app is opened.
please a little recommendation could be helpful.
Thanks

1 Like

Please elaborate more…
What do you mean by opened here…?
You want to detect is youTube app open by your app
Or what?

Yes i want to detect if youtube app is opened?

You would like to use PkgUtils extension.

2 Likes
1 Like

Yes this can only possible with background task extension