title: Android - getRunningservices(ActivityManager) deprecated
body: <p>I want to know <code>MyService.java</code> is working or not?</p>
  <h2>I create this method:</h2>
  <pre><code>private boolean isServiceAlive(Class&lt;?&gt; serviceClass) {
      ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
      for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {
          if (serviceClass.getName().equals(service.service.getClassName())) {
              return true;
          }
      }
      return false;
  }
  </code></pre>
  <p>it works fine but <code>manager.getRunningServices()</code> is deprecated from API 26. So have we another good solution(method) to get a list of the services that are currently running?</p>