title: The method getSystemService(String) is undefined for the type Listen
body: <p>I'm trying to check if com.android.music is running and I'm getting the following error on this line <code>this.getSystemService(Context.ACTIVITY_SERVICE);</code></p>
  
  <p>error:</p>
  
  <blockquote>
    <p>The method getSystemService(String) is undefined for the type Listen</p>
  </blockquote>
  
  <p>Code:    </p>
  
  <pre><code>public boolean isMusicRunning() {        
      ActivityManager activityManager = (ActivityManager) this.getSystemService(Context.ACTIVITY_SERVICE);
      List&lt;RunningAppProcessInfo&gt; procInfos = activityManager.getRunningAppProcesses();
      for (int i = 0; i &lt; procInfos.size(); i++) {
          if (procInfos.get(i).processName.equals("com.android.music")) {
              Toast.makeText(null, "music is running",
                      Toast.LENGTH_LONG).show();
          }
      }
  }
  </code></pre>
  
  <p>If you could let me know what I'm doing wrong here that would be great!</p>