0

Is there a way to detect whether a particular app is running or not from my application.

I have an API call which will fire every 5 min interval in app background, before making call I wants to detect whether a particular app is running or not. If app is running then will make API call else will look next time.

Anupam Mishra
  • 3,408
  • 5
  • 35
  • 63
  • 1
    No. and you can't schedule your app to run every 5 minutes either – Paulw11 Sep 19 '16 at 13:23
  • check my answer. @Anupam Mishra – KAR Sep 19 '16 at 13:27
  • I mistakenly marked this as a duplicate when the question I was marking was too old. This is now not possible by any of the solutions given in the linked answers. Sorry. – Fogmeister Sep 19 '16 at 13:37
  • check this link, [http://stackoverflow.com/questions/8252396/how-to-determine-‌​which-apps-are-backg‌​round-and-which-app-‌​is-foreground-on-ios‌​-by/12315750#1231575‌​0](http://stackoverflow.com/questions/8252396/how-to-determine-%E2%80%8C%E2%80%8Bwhich-apps-are-backg%E2%80%8C%E2%80%8Bround-and-which-app-%E2%80%8C%E2%80%8Bis-foreground-on-ios%E2%80%8C%E2%80%8B-by/12315750#1231575%E2%80%8C%E2%80%8B0) Hope this will helpful to you. But it's not good to call api at every 5 mins. – KAR Sep 19 '16 at 13:31

1 Answers1

0

You cannot do that in iOS without jailbreaking.

Nonetheless, there is a workaround but for limited apps. check these answers: [1], [2], [3]
Also this will help you.

And please search a bit before posting similar question.

Community
  • 1
  • 1
x4h1d
  • 6,042
  • 1
  • 31
  • 46