title: android block login after X failed attempts
body: <p>I have an android application with login<br>
   I'm trying to block login for x minutes after y failed attempts. 
   if user try more than y times I want to compare  with the system time and after x minute user can login how can I achieve am new to android please help me</p>
  
  <pre><code>lgn.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View v) {
          uname = user.getText().toString();
          pass = passwrd.getText().toString();
  
          if (isConnectingToInternet()) {
              if ((passwrd.equals() == "username") || (user.equlas() == "password")) {
                  Toast -&gt;success
              }
              if(count &gt;=4){
                  // this part i dont know how to 
                  //i want to block 30 minute if user tried x attemts, 
                  lgnbutton-&gt;disble
              }
          }
      }
  }
  </code></pre>