title: How to get instance of ActivityManager in Xamarin?
body: <p>To check if the application is in foregraound or background i am trying to access ActivityManager as per below.</p>
  
  <pre><code>ActivityManager activityManager = GetSystemService(Context.ACTIVITY_SERVICE) as ActivityManager;
              List&lt;RunningAppProcessInfo&gt; appProcesses = activityManager.getRunningAppProcesses();
              foreach(RunningAppProcessInfo appProcess in appProcesses){
                  if(appProcess.importance == RunningAppProcessInfo.IMPORTANCE_FOREGROUND){
                      Log.i("Foreground App", appProcess.processName);
                      //SetNotification ();
                  }
              }
  </code></pre>
  
  <p>But I am getting compliation error as "Android.Content.Context does not contain a definition for ACTIVITY_SERVICE" at first line. </p>
  
  <p>How can i access ActivityManager in Xamarin ? </p>