022-02-26 15:12:43.683 13941-13941/com.example.paamemregistration E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.paamemregistration, PID: 13941
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.paamemregistration/com.example.paamemregistration.MainActivity}: java.lang.ClassCastException: com.example.paamemregistration.MainActivity cannot be cast to im.delight.android.webview.AdvancedWebView$Listener
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3108)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3251)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1948)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7045)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
Caused by: java.lang.ClassCastException: com.example.paamemregistration.MainActivity cannot be cast to im.delight.android.webview.AdvancedWebView$Listener
at com.example.paamemregistration.MainActivity.onCreate(MainActivity.java:19)
at android.app.Activity.performCreate(Activity.java:7327)
at android.app.Activity.performCreate(Activity.java:7318)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3088)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3251)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1948)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7045)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
Kindly assist. It seems to be grabbing the webview fine but is unable to set the listener. when I try with mWebView.setListener(this, this);it brings an error for me to specify that the listener for the second context is Advanced Webview Listener.
Error
022-02-26 15:12:43.683 13941-13941/com.example.paamemregistration E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.paamemregistration, PID: 13941 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.paamemregistration/com.example.paamemregistration.MainActivity}: java.lang.ClassCastException: com.example.paamemregistration.MainActivity cannot be cast to im.delight.android.webview.AdvancedWebView$Listener at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3108) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3251) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1948) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7045) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964) Caused by: java.lang.ClassCastException: com.example.paamemregistration.MainActivity cannot be cast to im.delight.android.webview.AdvancedWebView$Listener at com.example.paamemregistration.MainActivity.onCreate(MainActivity.java:19) at android.app.Activity.performCreate(Activity.java:7327) at android.app.Activity.performCreate(Activity.java:7318) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3088) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3251) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1948) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7045) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
Code
Kindly assist. It seems to be grabbing the webview fine but is unable to set the listener. when I try with
mWebView.setListener(this, this);
it brings an error for me to specify that the listener for the second context is Advanced Webview Listener.