[Q] how to hardcode url navigation webview

389 posts
Thanks Meter: 134
By viv_jen, Senior Member on 23rd April 2014, 10:16 AM
Post Reply Subscribe to Thread Email Thread
Im using a webview to display a website.
The page iam opening using loadurl method is the login page, on successful login redirection occurs to a particular page .
I want to skip that page i.e dont want to show that page rather show the webpage after that


eg If my webview starts with webpage A
on login success it shows webpage B
and then next page is webpage C
i want after Login success in page A it should go automatically to webpage C

current code im using
public boolean shouldOverrideUrlLoading(WebView view, String url) {
            if (Uri.parse(url).getHost().trim().equals("")) {
            return false;
so any tips/pointers as to how i do this? thanks
23rd April 2014, 02:16 PM |#2  
Masrepus's Avatar
Senior Member
Thanks Meter: 93
Maybe you load the webview in a background task without updating the ui and then execute the test method you mentioned above and only update the webview ui once you determined whether you must override the url. Not sure if that is possible but maybe it is

Phone : Nexus 4
Pure KitKat 4.4.2 stock, no root, no mods

4d 61 73 72 65 70 75 73 20 66 74 77

Gesendet von Tapatalk
The Following User Says Thank You to Masrepus For This Useful Post: [ View ]
Post Reply Subscribe to Thread

android, urlredirection, webview

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes