• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Init
2
3
4## Overview
5
6Provides APIs for checking SystemCapability (SycCap) support.
7
8You can use the provided APIs to read the SycCap parameter file to check whether a specific SycCap is supported.
9
10**Since:**
11
128
13
14
15## Summary
16
17
18### Files
19
20| Name| Description|
21| -------- | -------- |
22| [syscap_ndk.h](syscap__ndk_8h.md) | Declares the APIs for checking SycCap support.<br>**File to include**: <syscap_ndk.h><br>**Library**: libdeviceinfo_ndk.z.so|
23
24
25### Functions
26
27| Name| Description|
28| -------- | -------- |
29| [canIUse](#caniuse) (const char \*cap) | Checks whether a SysCap is supported. SystemCapability (SysCap) refers to a standalone feature in the operating system. Different devices support different SysCap sets. Each SysCap corresponds to one or more APIs. You can determine whether an API can be used by checking SysCap support.|
30
31
32## Function Description
33
34
35### canIUse()
36
37
38```
39bool canIUse (const char * cap)
40```
41
42**Description**
43
44Checks whether a SysCap is supported. SystemCapability (SysCap) refers to a standalone feature in the operating system. Different devices support different SysCap sets. Each SysCap corresponds to one or more APIs. You can determine whether an API can be used by checking SysCap support.
45
46**Parameters**
47
48| Name| Description|
49| -------- | -------- |
50| cap | Name of the SysCap to check.|
51
52**Returns**
53
54Check result. The value **true** means that the SysCap is supported, and **false** means the opposite.
55