Code example for Handler

Methods: postremoveCallbacks

0
            mIntent = intent;
        } 
 
        public void run() { 
            onHandleIntent(mIntent);
            mHandler.removeCallbacks(mWorkDoneRunnable);
            mHandler.post(mWorkDoneRunnable);
        } 
    } 
 
    /** 
     * This method is invoked on the worker thread with a request to process. The processing happens 
     * on a worker thread that runs independently from other application logic. When all requests 
     * have been handled, the IntentService stops itself, so you should not call {@link #stopSelf}. 
     * 
     * @param intent The value passed to {@link Context#startService(Intent)}. 
     */ 
    abstract protected void onHandleIntent(Intent intent);
}