FinestWebView-Android icon indicating copy to clipboard operation
FinestWebView-Android copied to clipboard

WebView Close Listener

Open zahid--ali opened this issue 9 years ago • 3 comments

How can I add onClose listener in FinestWebView? @TheFinestArtist

zahid--ali avatar Jul 16 '16 11:07 zahid--ali

I'm looking for this feature. @zahid--ali @TheFinestArtist

oktayayr avatar Jul 28 '16 09:07 oktayayr

Same here and I think finally I will end-up with extending the ListenerInterface, Builder and Activity itself for related methods.

olgunkaya avatar Oct 19 '17 01:10 olgunkaya

Ok I did it.

public class CloseListener extends BroadcastReceiver {

public CloseListener(Context conttext) {
        super();
        this.context = conttext;
        LocalBroadcastManager.getInstance(this.context).registerReceiver(this, new IntentFilter("WEBVIEW_EVENT"));
    }
    @Override
    public void onReceive(Context context, Intent intent) {
        BroadCastManager.Type intentType = (BroadCastManager.Type) intent.getExtras().get("EXTRA_TYPE");
        if(intentType == BroadCastManager.Type.UNREGISTER) {
            //doStuff();
        }
    }
}

olgunkaya avatar Oct 19 '17 14:10 olgunkaya