Using the android webview template there is an example for handling js alerts.
class MyWebChromeClient < Android::Webkit::WebChromeClient
def onJsAlert(view, url, message, result)
puts message
result.confirm
true
end
end
How would I implement this for confirm with the builtin Dialog.Builder?
The trick was to pass the view.context to the
Builderand add listeners that handle theonClick: