Android ValueCallback - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android ValueCallback class.

This code example shows how to use the following methods:onReceiveValue
                mController.getActivity().sendBroadcast(
                        new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, result));
            } 
        } 
 
        mUploadMessage.onReceiveValue(result);
        mHandled = true;
        mCaughtActivityNotFoundException = false;
    } 
 
    void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType, String capture) {
 
        final String imageMimeType = "image/*";
        final String videoMimeType = "video/*";
        final String audioMimeType = "audio/*";
        final String mediaSourceKey = "capture";
        final String mediaSourceValueCamera = "camera";
        final String mediaSourceValueFileSystem = "filesystem";
        final String mediaSourceValueCamcorder = "camcorder";
        final String mediaSourceValueMicrophone = "microphone";
5
CodeRank
This code example shows how to use the following methods:onReceiveValue
        try { 
            webServer = new TestWebServer(false);
            final String pageUrl = webServer.setResponse(path, html, null);
            loadUrlSync(awContents, mContentsClient.getOnPageFinishedHelper(), pageUrl);
            visitedHistoryHelper.waitForCallback(callCount);
            assertNotNull(visitedHistoryHelper.getCallback());
 
            visitedHistoryHelper.getCallback().onReceiveValue(visitedLinks);
            visitedHistoryHelper.getCallback().onReceiveValue(null);
 
            loadUrlSync(awContents, mContentsClient.getOnPageFinishedHelper(), pageUrl);
        } finally { 
            if (webServer != null) webServer.shutdown();
        } 
    } 
 
    @Feature({"AndroidWebView"}) 
    @SmallTest 
    public void testGetVisitedHistoryCallbackAfterDestroy() throws Throwable { 
        GetVisitedHistoryHelper visitedHistoryHelper =
5
CodeRank
This code example shows how to use the following methods:onReceiveValue
  @Override 
  public void getVisitedHistory(ValueCallback<String[]> callback) {
    if (webClient_ != null) {
      webClient_.getVisitedHistory(callback);
    } else { 
      callback.onReceiveValue(new String[] {});
    } 
  } 
   
  //// WebViewClient proxy methods. 
  @Override 
  public void onPageStarted(String url) {
    if (viewClient_ != null)
      viewClient_.onPageStarted(view_, url, null);
  } 
  @Override 
  public void onPageFinished(String url) {
    if (viewClient_ != null)
      viewClient_.onPageFinished(view_, url);
  } 
5
CodeRank
This code example shows how to use the following methods:onReceiveValue
   * @param capture The value of the 'capture' attribute of the input tag 
   *         associated with this file picker. 
   * @hide 
   */ 
  public void openFileChooser(ValueCallback<Uri> uploadFile, String acceptType, String capture) {
      uploadFile.onReceiveValue(null);
  } 
 
  /** 
   * Tell the client that the page being viewed is web app capable, 
   * i.e. has specified the fullscreen-web-app-capable meta tag. 
   * @hide 
   */ 
  public void setInstallableWebApp() { } 
 
  /** 
   * Tell the client that the page being viewed has an autofillable 
   * form and the user would like to set a profile up. 
   * @param msg A Message to send once the user has successfully 
   *      set up a profile and to inform the WebTextView it should 
5
CodeRank
This code example shows how to use the following methods:onReceiveValue
 
	         Uri result = intent == null || resultCode != RESULT_OK ? null
 
	                 : intent.getData();
 
	         mUploadMessage.onReceiveValue(result);
 
	         mUploadMessage = null;
 
	     } 
 
	 } 
	 
 
  
	 
	 
   
   private void adroidInfo() 
   { 
3
CodeRank
This code example shows how to use the following methods:onReceiveValue
  @Override 
  public void getVisitedHistory(ValueCallback<String[]> callback) {
    if (webClient_ != null) {
      webClient_.getVisitedHistory(callback);
    } else { 
      callback.onReceiveValue(new String[] {});
    } 
  } 
  @Override 
  public void onReceivedTitle(String title) {
    if (viewClient_ != null) {
      webClient_.onReceivedTitle(view_, title);
    } 
  } 
 
  //// WebViewClient proxy methods. 
  @Override 
  public void onPageStarted(String url) {
    if (viewClient_ != null)
      viewClient_.onPageStarted(view_, url, null);
3
CodeRank
This code example shows how to use the following methods:onReceiveValue
        { 
            if (mUploadMessage == null)
                return; 
            Uri result = intent == null || resultCode != RESULT_OK ? null
                    : intent.getData();
            mUploadMessage.onReceiveValue(result);
            mUploadMessage = null;
        } 
    } 
 
    protected class UshahidiWebClient extends WebViewClient {
 
        @Override 
        public void onPageFinished(WebView view, String url) {
            super.onPageFinished(view, url);
        } 
 
        @Override 
        public void onPageStarted(WebView view, String url, Bitmap favicon) {
            super.onPageStarted(view, url, favicon);
3
CodeRank
This code example shows how to use the following methods:onReceiveValue
                mController.getActivity().sendBroadcast(
                        new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, result));
            } 
        } 
 
        mUploadMessage.onReceiveValue(result);
        mHandled = true;
        mCaughtActivityNotFoundException = false;
    } 
 
    void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType) {
 
        final String imageMimeType = "image/*";
        final String videoMimeType = "video/*";
        final String audioMimeType = "audio/*";
        final String mediaSourceKey = "capture";
        final String mediaSourceValueCamera = "camera";
        final String mediaSourceValueFileSystem = "filesystem";
        final String mediaSourceValueCamcorder = "camcorder";
        final String mediaSourceValueMicrophone = "microphone";
4
CodeRank
This code example shows how to use the following methods:onReceiveValue
                mController.getActivity().sendBroadcast(
                        new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, result));
            } 
        } 
 
        mUploadMessage.onReceiveValue(result);
        mHandled = true;
        mCaughtActivityNotFoundException = false;
    } 
 
    void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType) {
 
        final String imageMimeType = "image/*";
        final String videoMimeType = "video/*";
        final String audioMimeType = "audio/*";
        final String mediaSourceKey = "capture";
        final String mediaSourceValueCamera = "camera";
        final String mediaSourceValueFileSystem = "filesystem";
        final String mediaSourceValueCamcorder = "camcorder";
        final String mediaSourceValueMicrophone = "microphone";
4
CodeRank
This code example shows how to use the following methods:onReceiveValue
                mController.getActivity().sendBroadcast(
                        new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, result));
            } 
        } 
 
        mUploadMessage.onReceiveValue(result);
        mHandled = true;
        mCaughtActivityNotFoundException = false;
    } 
 
    void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType) {
 
        final String imageMimeType = "image/*";
        final String videoMimeType = "video/*";
        final String audioMimeType = "audio/*";
        final String mediaSourceKey = "capture";
        final String mediaSourceValueCamera = "camera";
        final String mediaSourceValueFileSystem = "filesystem";
        final String mediaSourceValueCamcorder = "camcorder";
        final String mediaSourceValueMicrophone = "microphone";
4
CodeRank

Related Android ValueCallback Questions & Answers:

See Code Examples for Android ValueCallback Methods: