Code example for ValueCallback

Methods: onReceiveValue

0
    private void saveWebArchiveInternal(String path, final ValueCallback<String> callback) {
        if (path == null) {
            ThreadUtils.runOnUiThread(new Runnable() {
                @Override 
                public void run() { 
                    callback.onReceiveValue(null);
                } 
            }); 
        } else { 
            nativeGenerateMHTML(mNativeAwContents, path, callback);
        } 
    } 
 
    /** 
     * Try to generate a pathname for saving an MHTML archive. This roughly follows WebView's 
     * autoname logic. 
     */ 
    private static String generateArchiveAutoNamePath(String originalUrl, String baseName) {
        String name = null;
        if (originalUrl != null && !originalUrl.isEmpty()) {
            try {