当URL为stackoverflow.com时,我正在获取URL并完成活动。如何将该URL传递给家长活动?
wvPayment.setWebViewClient(new WebViewClient(){
@Override
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
Log.d(TAG, "shouldOverrideUrlLoading: "+String.valueOf(request.getUrl()));
if(String.valueOf(request.getUrl()).equals("http://stackoverflow.com/")){
finish();
Toast.makeText(PaymentActivity.this ,"Successful",Toast.LENGTH_LONG).show();
}
return true;
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
wvPayment.setVisibility(View.GONE);
ProgressBar.setVisibility(View.VISIBLE);
}
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
wvPayment.setVisibility(View.VISIBLE);
ProgressBar.setVisibility(View.GONE);
}
});