Code example for Handler

Methods: obtainMessagesendMessage

0
        } 
    } 
 
    protected void sendMessage(Message msg) {
        if(handler != null){
            handler.sendMessage(msg);
        } else { 
            handleMessage(msg);
        } 
    } 
 
    protected Message obtainMessage(int responseMessage, Object response) {
        Message msg = null;
        if(handler != null){
            msg = this.handler.obtainMessage(responseMessage, response);
        }else{ 
            msg = Message.obtain();
            msg.what = responseMessage;
            msg.obj = response;
        } 
Stop searching for code, let great code find you!  Add Codota to your java IDE