title: How to check battery saver is on in android API <21
body: <p>today i create a app in map , but it crash when battery saver is on .</p>
  
  <p>How to check event when battery saver in on, for every device, help me. Thanks</p>
  
  <p>i try this, but not working in API &lt;21: </p>
  
  <pre><code>                PowerManager powerManager = (PowerManager)
                          this.getSystemService(Context.POWER_SERVICE);
                  if ( powerManager.isPowerSaveMode()) {
                      // Animations are disabled in power save mode, so just show a toast instead.
                      Toast.makeText(customer_textReport.this, "Vui lòng tắt chế độ tiết kiệm pin", Toast.LENGTH_SHORT).show();
                  }
                  else {
  
                      Intent intentvitri = new Intent(customer_textReport.this, CustomerGetLocation.class);
                      startActivityForResult(intentvitri, 111);
                  }
  </code></pre>