Skip to content Skip to sidebar Skip to footer

Calling Activity From Webview With @javascriptinterface

I'm stuck on my project and requesting your help! I'm trying to call an Activity(BarcodeScannerActivity.java) from webview in MainActivity.java with button click using javascript

Solution 1:

Your interface takes a string as a parameter:

@JavascriptInterfacepublicvoidopenBarcodeScanner(String str) {

But your invocation doesn't pass any parameters:

Android.openBarcodeScanner();

Post a Comment for "Calling Activity From Webview With @javascriptinterface"