Exemple #1
0
        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);
        }
Exemple #3
0
        bool IsInForeground()
        {
            bool isInForeground;

            RunningAppProcessInfo myProcess = new RunningAppProcessInfo();

            ActivityManager.GetMyMemoryState(myProcess);
            isInForeground = myProcess.Importance == Android.App.Importance.Foreground;

            return(isInForeground);
        }
Exemple #4
0
        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);
        }
Exemple #6
0
        private bool isApplicationInTheBackground()
        {
            bool isInBackground;

            RunningAppProcessInfo myProcess = new RunningAppProcessInfo();

            ActivityManager.GetMyMemoryState(myProcess);
            isInBackground = myProcess.Importance != Android.App.Importance.Foreground;

            return(isInBackground);
        }