I am working on an android app that is having a webview in it that holds a button in it.Now what I want to do is that whenever I click on that button instead of remain in the webview I should be redirected to the homepage of my android app.What should I do.
Asked
Active
Viewed 47 times
2
-
show me your code here. – amirul Jan 04 '20 at 05:45
-
Take a look at this: https://stackoverflow.com/questions/20917235/webviews-html-button-click-detection-in-activityjava-code. – Taslim Oseni Jan 04 '20 at 08:50
1 Answers
0
You bind the WebView to your Android application with the JavascriptInterface. Here are some reference docs: https://developer.android.com/guide/webapps/webview#BindingJavaScriptCommunicationwith web-view and activity/fragment

Ravi
- 2,277
- 3
- 22
- 37