从android中的webview获取响应

问题描述 投票:0回答:1

我正在使用支付网关(Voguepay),其中请求URL生成我想重定向到Webview中该URL的响应URL

我的网络视图代码

    @SuppressLint("SetJavaScriptEnabled")
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.webveiw);
        mWebView = findViewById(R.id.activity_main_webview);
        WebSettings webSettings = mWebView.getSettings();
        webSettings.setJavaScriptEnabled(true);
        mWebView.setWebViewClient(new MyWebViewClient());


        // REMOTE RESOURCE
         mWebView.loadUrl("https://voguepay.com/?p=linkToken&v_merchant_id=demo&\n" +
                 " memo=Payment for laptop&total=1000&merchant_ref=ref123&\n" +
                 " notify_url=https://example.com/notification.php&\n" +
                 " success_url=https://example.com/success.php&\n" +
                 " fail_url=https://example.com/fail.php&developer_code=ddd&cur=NGN");
}

请求URL成功加载并显示what it displays when it load url

我想重定向Web视图以加载上图中的链接

java android android-webview
1个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.