title: Stop AlarmManager from Service but created in Activity
body: <p>I create an AlarmManager following way. After a specific time the service stops with stopSelf() but the alarmmanager starts the Service again. 
  How can I stop the AlarmManager inside the Service? The Activity is't running anymore, I have to do it inside the Service.</p>
  
  <p>Activity which starts the Service periodically with AlarmManager:</p>
  
  <pre><code>Intent i=new Intent(this, AppService.class);
  PendingIntent pi = PendingIntent.getService(this, 0, i, PendingIntent.FLAG_UPDATE_CURRENT);
  AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE); 
  
  if((tb_runBG.isChecked()))
  {    
      alarmManager.cancel(pi);
      alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), 1000 *update_time, pi);                              
  }
  else
    {    
      // From Activity it's no problem to stop the AlarmManager   
      alarmManager.cancel(pi);
      stopService(new Intent(this, AppService.class));                     
    }
  </code></pre>
  
  <p>Service in which I try to stop the AlarmManager:</p>
  
  <pre><code>Intent i=new Intent(this, volumeActivity.class);                      
  PendingIntent pi=PendingIntent.getActivity(this, 0, i, 0);
  // Her I should get the getSystemService from the Activity, but how??
  AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
  // Following unfortunately not working ...
  alarmManager.cancel(pi);
  stopSelf(); 
  </code></pre>
  
  <p>Unfortunately it's not working. The Servive stops, but its called again by the AlarmManager ...</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Following also not Working:</p>
  
  <pre><code>AlarmManager alarmManager = (AlarmManager) this.getBaseContext().getSystemService(Context.ALARM_SERVICE); 
  </code></pre>
  
  <p>or</p>
  
  <pre><code>AlarmManager alarmManager = (AlarmManager) this.getApplicationContext().getSystemService(Context.ALARM_SERVICE);  
  </code></pre>