Answers for "extract javascript variable from webview using javascript interface"

0

extract javascript variable from webview using javascript interface

public class CustomJavaScriptInterface {
    Context mContext;

    /** Instantiate the interface and set the context */
    CustomJavaScriptInterface(Context c) {
        mContext = c;
    }
    

    /** retrieve the ids */
    public void getIds(final String myIds) {
        
        //Do somethings with the Ids
    }
    
}
Posted by: Guest on January-10-2021
0

extract javascript variable from webview using javascript interface

public class FormJavascriptInterface {
    private Context context;

    FormJavascriptInterface(Context context) {
        this.context = context;
    }

    @JavascriptInterface
    public void showUser(String name, String email) {
        new AlertDialog.Builder(context)
                .setTitle("User")
                .setMessage(name + " " + email)
                .show();
    }
}
Posted by: Guest on January-10-2021

Code answers related to "extract javascript variable from webview using javascript interface"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language