DEV Community

HarmonyOS
HarmonyOS

Posted on

VoIP Call Manager not available in wearable devices: Configure syscap.json

Read the original article:VoIP Call Manager not available in wearable devices: Configure syscap.json

Context

When using the voipCall module from @kit.CallServiceKit on wearable devices, the system does not include SystemCapability.Telephony.VoipCallManager by default. If a syscap.json file is not configured, this leads to a build-time error indicating the missing capability.

Description

When the following import is used in a wearable project:

import { voipCall } from '@kit.CallServiceKit';
Enter fullscreen mode Exit fullscreen mode

The build process throws the following error:

The default system capabilities of devices wearable do not include SystemCapability.Telephony.VoipCallManager. Configure the capabilities in syscap.json. <ArkTSCheck>
Enter fullscreen mode Exit fullscreen mode

This occurs because wearable devices do not enable the VoIP Call Manager capability by default.

Solution / Approach

To resolve this issue, create a syscap.json file under the main directory of the project and add the following configuration:

cke_3429.png

{
  "devices": {
    "general": [
      "wearable"
    ]
  },
  "development": {
    "addedSysCaps": [
      "SystemCapability.Telephony.VoipCallManager"
    ]
  }
}
Enter fullscreen mode Exit fullscreen mode

This configuration explicitly enables the SystemCapability.Telephony.VoipCallManager capability for wearable devices.

Key Takeaways

  • Wearable devices do not support SystemCapability.Telephony.VoipCallManager by default.
  • Using voipCall requires explicitly declaring this capability in syscap.json.
  • The syscap.json file must be placed under the main directory of the project.

Additional Resources

https://developer.huawei.com/consumer/en/doc/harmonyos-references/syscap

Written by Baris Tuzemen

Top comments (0)