views:

260

answers:

2

Hi All.

In my android application I want to get URL of the hyper link text, selected from web page in my android web browser. How can I get it?

I want to URL of the hyper link (link that is clicked inside of that webview).

please help me..

A: 

You can add a WebViewClient to your WebView. Now you have to extend WebViewClient and override the shouldOverrideURLloading method. This method will be called every time a URL is loaded.

You now get the URL that is about to load as a String. If you want to prevent the WebView from load the URL or jump to another part of your app return true if you want the webview to load the URL return false.

This will only work if you are using a WebView in you application. As far as I know there is no way to hook into the web browser in that way.

Janusz
Thnx for reply..Now, I will try it...
Addy
A: 

Hi, I make a website using asp using local database. In there I check the Id and Passward to login that page. Now how can I check the Id and Passward using android code (by emulator/device)? Please anyone know, help me....I assignment submit date in knocking at the door. Asma

Asma-ull-Hosna