When the Compiler enter doInBackground the App freez
Main Class (ParkTicketAlarm):
Timer timer = new Timer();
timer.doInBackground(ParkTicketAlarm.this);
AsyncClass (Timer)
protected String doInBackground(ParkTicketAlarm... params) {
java.sql.Time time = new java.sql.Time(System.currentTimeMillis());
while(time.getMinutes()!=28){
try {
wait(2000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
time = new java.sql.Time(System.currentTimeMillis());
}
params[0].expired();
return null;
}
}