Android webview back button (physical button)

If you press the back button (physical button) in the Android webview, the app is immediately closed. It ends right away. I don’t want this. I want When the back button is clicked, javascript:history.go(-1); I want it to be like this. I want the browser to jump to the previous page.

And when there is no more browser history, “Should I quit?” I wish it popped up. What should I do?