Code example for AlarmManager

Methods: cancel

0
     
    unregisterReceiver(onNotice);
  } 
   
  public void cancelAlarm(View v) {
    mgr.cancel(pi);
  } 
   
  private BroadcastReceiver onNotice=new BroadcastReceiver() {
    public void onReceive(Context ctxt, Intent i) { 
      notice.setText(new Date().toString()); 
      abortBroadcast(); 
    } 
  }; 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE