Message sendToTarget - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Message sendToTarget method.

This code example shows how to use the following methods:sendToTarget, setTarget
    this.handler = handler;
  } 
 
  @Implementation 
  public void send(Message message) throws RemoteException {
    message.setTarget(handler);
    message.sendToTarget();
  } 
} 
8
CodeRank
This code example shows how to use the following methods:sendToTarget, setTarget
        this.handler = handler;
    } 
 
    @Implementation 
    public void send(Message message) throws RemoteException {
        message.setTarget(handler);
        message.sendToTarget();
    } 
} 
7
CodeRank
This code example shows how to use the following methods:sendToTarget
    Point cameraResolution = configManager.getCameraResolution();
    Handler thePreviewHandler = previewHandler;
    if (cameraResolution != null && thePreviewHandler != null) {
      Message message = thePreviewHandler.obtainMessage(previewMessage, cameraResolution.x,
          cameraResolution.y, data);
      message.sendToTarget();
      previewHandler = null;
    } else { 
      Log.d(TAG, "Got preview callback, but no handler or resolution available");
    } 
  } 
 
} 
6
CodeRank
This code example shows how to use the following methods:sendToTarget, forMessage
        Assert.assertTrue("unexpected call to acknowledge SMS", mExpectingAcknowledgeGsmSms);
        Assert.assertEquals(mExpectingAcknowledgeGsmSmsSuccess, success);
        Assert.assertEquals(mExpectingAcknowledgeGsmSmsFailureCause, cause);
        mExpectingAcknowledgeGsmSms = false;
        if (response != null) {
            AsyncResult.forMessage(response);
            response.sendToTarget();
        } 
        notifyAll();    // wake up assertExpectedMethodsCalled()
    } 
 
    @Override 
    public synchronized void acknowledgeIncomingGsmSmsWithPdu(boolean success, String ackPdu,
            Message response) {
        Log.d(TAG, "acknowledgeLastIncomingGsmSmsWithPdu: success=" + success
                + ", ackPDU= " + ackPdu);
        Assert.assertTrue("unexpected call to acknowledge SMS", mExpectingAcknowledgeGsmSms);
        Assert.assertEquals(mExpectingAcknowledgeGsmSmsSuccess, success);
        Assert.assertEquals(mExpectingAcknowledgeGsmSmsPdu, ackPdu);
        mExpectingAcknowledgeGsmSms = false;
6
CodeRank
This code example shows how to use the following methods:sendToTarget
        @Override 
        public void onFormResubmission(WebView view, Message dontResend,
                Message resend) {
            // TODO Auto-generated method stub 
            //super.onFormResubmission(view, dontResend, resend); 
            resend.sendToTarget();
        } 
 
        @Override 
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            view.loadUrl(url);
            return true; 
        } 
         
        public void handleHistoryChange() { 
            activity.setTitleButtonEnabled("back", mWebView.canGoBack());
            activity.setTitleButtonEnabled("forward", mWebView.canGoForward());
        } 
    }	 
 
6
CodeRank
This code example shows how to use the following methods:sendToTarget
    /** {@inheritDoc} */ 
    @Override 
    public boolean onCreateWindow(WebView view, boolean dialog,
            boolean userGesture, Message resultMsg) {
        // do not open any new pop-ups 
        resultMsg.sendToTarget();
        return true; 
    } 
 
    /** {@inheritDoc} */ 
    @Override 
    public void onRequestFocus(WebView view) {
        mWrappedClient.onRequestFocus(view);
    } 
 
    /** {@inheritDoc} */ 
    @Override 
    public void onCloseWindow(WebView window) {
        mWrappedClient.onCloseWindow(window);
    } 
6
CodeRank
This code example shows how to use the following methods:sendToTarget
  public boolean onCreateWindow(WebView view, boolean dialog, boolean userGesture,
      Message resultMsg) {
    ViewAdapter newView = wdView.create();
    WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj;
    transport.setWebView((WebView) newView.getUnderlyingView());
    resultMsg.sendToTarget();
 
    wdChromeClient.onCreateWindow(newView);
    return delegate.onCreateWindow(view, dialog, userGesture, resultMsg);
  } 
 
  @Override 
  public void onRequestFocus(WebView view) {
    delegate.onRequestFocus(view);
  } 
 
  @Override 
  public void onProgressChanged(WebView view, int newProgress) {
    wdChromeClient.onProgressChanged(view, newProgress);
    delegate.onProgressChanged(view, newProgress);
5
CodeRank
This code example shows how to use the following methods:sendToTarget, setData
			b.putBoolean("error", true);
			b.putString("errormsg", e.getMessage());
		} 
		 
		dbHelper.close(); 
		m.setData(b);
		m.sendToTarget();
		return null; 
	} 
 
 
} 
5
CodeRank
This code example shows how to use the following methods:sendToTarget
   * @param dontResend The message to send if the browser should not resend 
   * @param resend The message to send if the browser should resend data 
   */ 
  public void onFormResubmission(ChromeView view, Message dontResend,
          Message resend) {
      dontResend.sendToTarget();
  } 
 
  /** 
   * Notify the host application to update its visited links database. 
   * 
   * @param view The ChromeView that is initiating the callback. 
   * @param url The url being visited. 
   * @param isReload True if this url is being reloaded. 
   */ 
  public void doUpdateVisitedHistory(ChromeView view, String url,
          boolean isReload) {
  } 
 
  /** 
5
CodeRank
This code example shows how to use the following methods:sendToTarget
    public void onReceivedError(int errorCode, String description, String failingUrl) {
    } 
 
    @Override 
    public void onFormResubmission(Message dontResend, Message resend) {
        dontResend.sendToTarget();
    } 
} 
5
CodeRank

Related Message sendToTarget Questions & Answers:

sendToTarget Method Overview
Sends this Message to the Handler specified by getTarget().
See Code Examples for other Android Message Methods: