ashokk
- Forum posts: 1
Jun 7, 2013, 9:11:57 AM via Website
Jun 7, 2013 9:11:57 AM via Website
In my Application I am using handlers for showing alerts after sometime. I have used postdelayed() method for delay. I want to remove handler's callback
so how to check that handler has callback?
final Handler handler_Alerts = new Handler();
Runnable r_Alerts = new Runnable() {
public void run() {
Toast.makeText(getApplicationContext(), "In Handler", Toast.LENGTH_SHORT).show();
handler_Alerts.postDelayed(this, 1000);
}
};
handler_Alerts.postDelayed(r_Alerts, 1000);
Now I want to remove this handler's callback
so how to check that handler has callback?
final Handler handler_Alerts = new Handler();
Runnable r_Alerts = new Runnable() {
public void run() {
Toast.makeText(getApplicationContext(), "In Handler", Toast.LENGTH_SHORT).show();
handler_Alerts.postDelayed(this, 1000);
}
};
handler_Alerts.postDelayed(r_Alerts, 1000);
Now I want to remove this handler's callback
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.