Answer the question
In order to leave comments, you need to log in
webview. Android. How to pass the address bar back to the application?
Hello.
An Intent is created that launches the application authorization page in a contact using a WebView. How can I make this WebView launch an Activity after authorization, passing the address bar to it? Needed to get an access_token.
Answer the question
In order to leave comments, you need to log in
Register a special handler that runs after the page has finished loading:
...
webview.setWebViewClient(new WebViewClient() {
public void onPageFinished (WebView view, String url) {
if (url.startwith(redirect_url)) {
Intent n = new Intent(....);
n.putString("url", url);
startActivity(n);
}
}
});
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question