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';
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>
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:
{
"devices": {
"general": [
"wearable"
]
},
"development": {
"addedSysCaps": [
"SystemCapability.Telephony.VoipCallManager"
]
}
}
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

Top comments (0)