Hook up onJsAlert on android.

This commit is contained in:
Cory McWilliams 2024-04-28 11:04:29 -04:00
parent 8c759bcbac
commit 48d6bf4c15

View File

@ -207,6 +207,23 @@ public class TildeFriendsActivity extends Activity {
return true;
}
@Override
public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
new AlertDialog.Builder(view.getContext())
.setTitle("Tilde Friends")
.setMessage(message)
.setNeutralButton(android.R.string.ok, new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int which)
{
result.confirm();
}
})
.create()
.show();
return true;
}
/*
** https://stackoverflow.com/questions/5907369/file-upload-in-webview
** https://stackoverflow.com/questions/8586691/how-to-open-file-save-dialog-in-android