Automatically detect phone number, email and URL links in Webview - Android sdk

Does anyone know how to automatically determine the phone number, email address and URL link in Webview? Then the user can click on it to call the pop-up call function, the email application and the web browser in the same way as the iPhone sdk got the automatic detection function on it in the web view.

Can anyone help with this?

Thanks.

+4
source share
1 answer

Read the Linkify class here .

Excerpt from the documentation:

addLinks(TextView text, int mask)

It scans the text of the provided TextView and turns all occurrences of the link types specified in the mask into interactive links. ''

0
source

Source: https://habr.com/ru/post/1397395/


All Articles