简体   繁体   中英

WebView tel: open chooser telephone or sms

In my shouldOverrideUrlLoading of my WebView I do the following to have some action when a tel: link is clicked:

Intent tel = new Intent(Intent.ACTION_DIAL, Uri.parse(url));
startActivity( tel );

My problem is that it only starts the telephone app (which seems to be the normal behaviour regarding tel: links). I want something like an intent chooser where I can select whether I want to send an sms or do a phone call. Is this possible with a tel: link?

创建具有2个选项的DialogFragment,然后让用户决定要做什么。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM