makePhoneCall

Requires:
BaseKit≥2.0.1@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
import { makePhoneCall } from '@ray-js/ray';

// Promise usage
try {
  const res = await makePhoneCall({ ...params });
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

Method signature
makePhoneCall(params: )

Description

Make a phone call

Parameters

PropertyTypeRequiredDescription
phoneNumberstringYesPhone number to call
complete() => voidNoCompletion callback (executed on both success and failure)
success() => voidNoCallback on successful API call
fail(params: Object) => voidNoFailure callback
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

import { makePhoneCall } from '@ray-js/ray'

// Make a phone call; opens the system dialer
makePhoneCall({
  phoneNumber: "10086",
  success: () => console.log("Dialer opened"),
  fail: error => console.error(error),
});