I am trying to call via Html.I have tried this
<a href='+2000000200200'>Please Click to Call</a>
Now when I click on this , it opens the the dialer having this number and then I press call and it initiates the call.
Now the thing I am trying to do is When I click the link , it automatically initiate the call.I mean the step of Dialler open and pressing call must be skip.So whenever I click the link it should start making call
Is it possible to do like this?I Really need experts advice about this
Thanks

有帮助吗?

解决方案 2

You can write a custom protocol handler for this type of thing, but the handler obviously needs to be installed on the machine using it.

Check this stackoverflow thread for custom protocol handling in ios and android.

Custom protocol handling windows

Using C#, register registry keys:

RegistryKey Key = Registry.ClassesRoot.CreateSubKey("test");
Key.CreateSubKey("DefaultIcon").SetValue("", "caller.exe,1");
Key.SetValue("", "call:Protocol");
Key.SetValue("URL Protocol", "");
Key.CreateSubKey(@"shell\open\command").SetValue("", "caller.exe %1");

Caller.exe being your handler:

using System;
using System.Collections.Generic;
using System.Text;

class Program
{
    static void Main(string[] args)
    {
        // args[0] contains the phone number
    }
}

Finally:

<a href="call:2000000200200">Call Number</a>

其他提示

Sorry is not possible and is inteend to be that way. Making the call needs a 3rd application and ofc you wouldnt want anyone making calls or even by mistake a call being made by just clicking.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top