PhoneCall Component
Properties
phoneNumber Specifies the phone number to call.
Data type: string |
||
Designer Writable | true |
<phonecall name="phonecallName" phoneNumber="0123456789"> |
Code Writeable | true |
phonecallName.phoneNumber = "0123456789" |
Code Readable | true |
let variable = phonecallName.phoneNumber |
class The styling class of the the component
Data type: string |
||
Designer Writable | true |
<phonecall name="phonecallName" class="Test class"> |
Code Writeable | false | |
Code Readable | false |
id The styling id of the the component
Data type: string |
||
Designer Writable | true |
<phonecall name="phonecallName" id="Test id"> |
Code Writeable | false | |
Code Readable | false |
name The name of the component that will be used to refer to it in code.
Data type: string |
||
Designer Writable | true |
<phonecall name="phonecallName" name="testComponent"> |
Code Writeable | false | |
Code Readable | false |
Methods
Method name | Description | Parameters | ||||
---|---|---|---|---|---|---|
makePhoneCall |
Launches the default dialer app set to start a phone call using the number in the PhoneNumber property. phonecallName.makePhoneCall() |
|
||||
makePhoneCallDirect |
Directly initiates a phone call using the number in the PhoneNumber property, bypassing user interaction to start the call. Most apps should use MakePhoneCall instead, which requires no permissions. phonecallName.makePhoneCallDirect() |
|
||||
addEventListener |
Method used to create event listeners. See Events below for samples. |
|
Events
Event name | Description | Parameters | ||||
---|---|---|---|---|---|---|
incomingCallAnswered | Event indicating that an incoming phone call is answered. phoneNumber is the incoming call phone number.phonecallName.addEventListener( "incomingCallAnswered", function (phoneNumber) { //Your code here } ) |
|
||||
phoneCallEnded | Event indicating that a phone call has ended. The status can be any of: 1: Incoming call was missed or rejected 2: Incoming call was answered and hung up 3: Outgoing call was hung up.phonecallName.addEventListener( "phoneCallEnded", function (status, phoneNumber) { //Your code here } ) |
|
||||
phoneCallStarted | Event indicating that a phone call has started. The status can be any of: 1: Incoming call is ringing 2: Outgoing call is dialledphonecallName.addEventListener( "phoneCallStarted", function (status, phoneNumber) { //Your code here } ) |
|