Android: callbacks with webview component?

I am authenticating from a third-party site, which should redirect back to my application with the auth token (OAUTH).

My callback works fine if I open a third-party site in a separate browser through

this.startActivity(new Intent(Intent.ACTION_VIEW, uri));

but if I paste the WebView component into my layout and open the url in this, the callback does not work. Webview says: "You do not have permission to open myapp: // callback? Token = ...." and quickly updates to "the webpage is unavailable ... temporarily down ... blah blah"

Any ideas?

+5
source share
1 answer

WebViewClient, URI . Hello, WebView . :

private class HelloWebViewClient extends WebViewClient {
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        view.loadUrl(url);
        return true;
    }
}

"view.loadUrl(url)", , URL URL- , .

+16

All Articles