my.makePhoneCall

Make a phone call.

Note: Mini Program Studio simulator does not support simulation temporarily. Please use the real machine to debug.

Sample Code

copy
// API-DEMO page/API/make-phone-call/make-phone-call.json
{
    "defaultTitle": "Make a phone call"
}
copy
// API-DEMO page/API/make-phone-call/make-phone-call.axml
<view class="page">
  <view class="page-section">
    <view class="page-section-title">my.makePhoneCall</view>
    <view class="page-section-btns">
      <view onTap="makePhoneCall">Make a phone call</view>
    </view>
  </view>
</view>
copy
// API-DEMO page/API/make-phone-call/make-phone-call.js
Page({
  makePhoneCall() {
    my.makePhoneCall({ number: '00000' });
  },
});

Parameters

PropertyType

Required

Description
numberStringYesPhone number.

FAQ

'Is not a function' error after calling my.makePhoneCall?

The Mini Program Studio simulator does not support simulation temporarily. Please use the real machine to debug.