0

My project has 2 applications (A & B) communicating to each other. A will access to B's database via ContentProvider. What I want is from A checking if B is running (Running here I mean B is on current tasks tray).

All answers I've found via Google led me to use Android.App.ActivityManager.RunningAppProcessInfo

However, because A is accessing B's DB via ContentProvider then B is in runningapp list even when B is not on current tasks tray (ReasonCode is RunningAppProcessInfo.ImportanceReasonCode

Is there any way that A can check if B is really in tasks tray?

Mohit Kanwar
  • 2,962
  • 7
  • 39
  • 59
meaholik
  • 440
  • 5
  • 19
  • check this http://stackoverflow.com/questions/3667022/checking-if-an-android-application-is-running-in-the-background – Nandakishore Shetty Jul 30 '15 at 05:46
  • Check out this one:- http://stackoverflow.com/a/5862048/1384010 – Adarsh Yadav Jul 30 '15 at 05:56
  • Thanks Nandakishore & Adarsh but that's not what I want. Firstly, I want A to check if B is running(both background & foreground), (not checking B detect itself running on background or foreground). Secondly, I want to cover the case in which user manually clear B from task tray. – meaholik Jul 30 '15 at 06:02

0 Answers0