@Override
  protected void onResume() {
    super.onResume();

    ScannerApplication application = this.getScannerApplication();
    application.incrementCurrentActivities();
  }
 @Override
 protected void onPause() {
   super.onPause();
   //    @Override
   //    public void onUserLeaveHint() {
   ScannerApplication application = this.getScannerApplication();
   application.decrementCurrentActivities();
   this.getScannerApplication().setCurrentLocationActivity(null);
 }