public static bool IsAppInForeground() { var myProcess = new RunningAppProcessInfo(); GetMyMemoryState(myProcess); return(myProcess.Importance == Importance.Foreground); }
public bool IsInBackground() { RunningAppProcessInfo myProcess = new RunningAppProcessInfo(); GetMyMemoryState(myProcess); return(myProcess.Importance != Android.App.Importance.Foreground); }
bool IsInForeground() { bool isInForeground; RunningAppProcessInfo myProcess = new RunningAppProcessInfo(); ActivityManager.GetMyMemoryState(myProcess); isInForeground = myProcess.Importance == Android.App.Importance.Foreground; return(isInForeground); }
private bool IsAppOnBackground() { bool isInBackground; RunningAppProcessInfo myProcess = new RunningAppProcessInfo(); ActivityManager.GetMyMemoryState(myProcess); isInBackground = myProcess.Importance != Importance.Foreground; return(isInBackground); }
public static bool IsApplicationInTheBackground() { bool isInBackground; RunningAppProcessInfo myProcess = new RunningAppProcessInfo(); GetMyMemoryState(myProcess); isInBackground = myProcess.Importance != Importance.Foreground; return(isInBackground); }
private bool isApplicationInTheBackground() { bool isInBackground; RunningAppProcessInfo myProcess = new RunningAppProcessInfo(); ActivityManager.GetMyMemoryState(myProcess); isInBackground = myProcess.Importance != Android.App.Importance.Foreground; return(isInBackground); }