Rectangle 27 0

android How to move another activity in webview redirecting url?


public boolean shouldOverrideUrlLoading(WebView view, String url)
{
    if(url.equals("http://My 3rd page redirecting URL"))
    {                       
        Intent i = new Intent(getApplicationContext(), APImages.class);
        startActivity(i);                   
    } else {
        webview.loadUrl(url);
    }
    return true;
}

One more thing, while opening the emulator and during first run of my app it asking security certificate with continue buttons and its redirecting to https page. but while installing the app in same emulator next time its not asking such things.

Note
Rectangle 27 0

android How to move another activity in webview redirecting url?


True if the host application wants to leave the current WebView and handle the url itself, otherwise return false.
webview.setWebViewClient(new WebViewClient()
{
    // Override URL

    public boolean shouldOverrideUrlLoading(WebView view, String url)
    {
        if(url.equals("http://My 3rd page redirecting URL"))
        {                       
            Intent i = new Intent(getApplicationContext(), APImages.class);
            startActivity(i);                   
            return true;
        }           
        return false;
    }

});

I tried as u specified. I got the text dispalying as "Obect moved here" with the word "here" as a link. but if i click it nothing happens.

Try returning false when you are not handle the event. This is from the WebClient reference.

Note
Rectangle 27 0

android How to move another activity in webview redirecting url?


Try onLoadResource. This should work for webview. Sometimes onOverride function doesnt work especially when you are calling an intent.

Note