• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Resource Management<a name="EN-US_TOPIC_0000001162414653"></a>
2
3-   [Imported Modules](#en-us_topic_0000001150318493_s56d19203690d4782bfc74069abb6bd71)
4-   [Permissions](#en-us_topic_0000001150318493_section11257113618419)
5-   [Methods](#en-us_topic_0000001150318493_section125675489541)
6-   [getResourceManager](#en-us_topic_0000001150318493_section192192415554)
7-   [getResourceManager](#en-us_topic_0000001150318493_section46989284018)
8-   [getResourceManager](#en-us_topic_0000001150318493_section0543541673)
9-   [getResourceManager](#en-us_topic_0000001150318493_section1816951410716)
10-   [Enum](#en-us_topic_0000001150318493_section1978842154715)
11-   [Direction](#en-us_topic_0000001150318493_section099619567453)
12-   [DeviceType](#en-us_topic_0000001150318493_section4734636131914)
13-   [ScreenDensity](#en-us_topic_0000001150318493_section7331173812197)
14-   [Appendix](#en-us_topic_0000001150318493_section1933416317165)
15-   [AsyncCallback<T\>](#en-us_topic_0000001150318493_section256244135613)
16-   [Configuration](#en-us_topic_0000001150318493_section12882825611)
17    -   [Attributes](#en-us_topic_0000001150318493_section1059684317312)
18
19-   [DeviceCapability](#en-us_topic_0000001150318493_section7200123494410)
20    -   [Attributes](#en-us_topic_0000001150318493_section2201153419440)
21
22-   [ResourceManager](#en-us_topic_0000001150318493_section137771134135415)
23    -   [getString](#en-us_topic_0000001150318493_section9779153419548)
24    -   [getString](#en-us_topic_0000001150318493_section159261924165411)
25    -   [getStringArray](#en-us_topic_0000001150318493_section4490132775420)
26    -   [getStringArray](#en-us_topic_0000001150318493_section1992322017541)
27    -   [getMedia](#en-us_topic_0000001150318493_section6710152513409)
28    -   [getMedia](#en-us_topic_0000001150318493_section6711152517409)
29    -   [getMediaBase64](#en-us_topic_0000001150318493_section11402326194315)
30    -   [getMediaBase64](#en-us_topic_0000001150318493_section6404726124312)
31    -   [getConfiguration](#en-us_topic_0000001150318493_section8123152874015)
32    -   [getConfiguration](#en-us_topic_0000001150318493_section312515284406)
33    -   [getDeviceCapability](#en-us_topic_0000001150318493_section104951210135017)
34    -   [getDeviceCapability](#en-us_topic_0000001150318493_section114961410115013)
35    -   [getPluralString](#en-us_topic_0000001150318493_section1549163064013)
36    -   [getPluralString](#en-us_topic_0000001150318493_section165183015405)
37
38
39## Imported Modules<a name="en-us_topic_0000001150318493_s56d19203690d4782bfc74069abb6bd71"></a>
40
41```
42import resmgr from '@ohos.resmgr';
43```
44
45## Permissions<a name="en-us_topic_0000001150318493_section11257113618419"></a>
46
47None.
48
49## Methods<a name="en-us_topic_0000001150318493_section125675489541"></a>
50
51## getResourceManager<a name="en-us_topic_0000001150318493_section192192415554"></a>
52
53Obtains the  **ResourceManager**  object of the current application.
54
55**Parameters**
56
57<a name="en-us_topic_0000001150318493_table69661135912"></a>
58<table><thead align="left"><tr id="en-us_topic_0000001150318493_row149668318915"><th class="cellrowborder" valign="top" width="8.81%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001150318493_p7966738914"><a name="en-us_topic_0000001150318493_p7966738914"></a><a name="en-us_topic_0000001150318493_p7966738914"></a>Name</p>
59</th>
60<th class="cellrowborder" valign="top" width="27.11%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001150318493_p296713699"><a name="en-us_topic_0000001150318493_p296713699"></a><a name="en-us_topic_0000001150318493_p296713699"></a>Type</p>
61</th>
62<th class="cellrowborder" valign="top" width="6.710000000000001%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001150318493_p196718315911"><a name="en-us_topic_0000001150318493_p196718315911"></a><a name="en-us_topic_0000001150318493_p196718315911"></a>Mandatory</p>
63</th>
64<th class="cellrowborder" valign="top" width="57.37%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001150318493_p9967231197"><a name="en-us_topic_0000001150318493_p9967231197"></a><a name="en-us_topic_0000001150318493_p9967231197"></a>Description</p>
65</th>
66</tr>
67</thead>
68<tbody><tr id="en-us_topic_0000001150318493_row99671533914"><td class="cellrowborder" valign="top" width="8.81%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p13838351705"><a name="en-us_topic_0000001150318493_p13838351705"></a><a name="en-us_topic_0000001150318493_p13838351705"></a>callback</p>
69</td>
70<td class="cellrowborder" valign="top" width="27.11%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p11967433914"><a name="en-us_topic_0000001150318493_p11967433914"></a><a name="en-us_topic_0000001150318493_p11967433914"></a><a href="#en-us_topic_0000001150318493_section256244135613">AsyncCallback</a>&lt;<a href="#en-us_topic_0000001150318493_section137771134135415">ResourceManager</a>&gt;</p>
71</td>
72<td class="cellrowborder" valign="top" width="6.710000000000001%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p19671336916"><a name="en-us_topic_0000001150318493_p19671336916"></a><a name="en-us_topic_0000001150318493_p19671336916"></a>Yes</p>
73</td>
74<td class="cellrowborder" valign="top" width="57.37%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p69671631796"><a name="en-us_topic_0000001150318493_p69671631796"></a><a name="en-us_topic_0000001150318493_p69671631796"></a>Indicates the callback containing the <strong id="en-us_topic_0000001150318493_b1744004415714"><a name="en-us_topic_0000001150318493_b1744004415714"></a><a name="en-us_topic_0000001150318493_b1744004415714"></a>ResourceManager</strong> object.</p>
75</td>
76</tr>
77</tbody>
78</table>
79
80**Return Values**
81
82None.
83
84**Example**
85
86```
87resmgr.getResourceManager((error, mgr) => {
88    // callback
89    mgr.getString(0x1000000, (error, value) => {
90        if (error != null) {
91            console.log(value);
92        } else {
93            console.log(value);
94        }
95    });
96
97    // promise
98    mgr.getString(0x1000000).then(value => {
99        console.log(value);
100    }).catch(error => {
101        console.log("getstring promise " + error);
102    });
103}
104
105```
106
107## getResourceManager<a name="en-us_topic_0000001150318493_section46989284018"></a>
108
109Obtains the  **ResourceManager**  object of the specified application.
110
111**Parameters**
112
113<a name="en-us_topic_0000001150318493_table146992288015"></a>
114<table><thead align="left"><tr id="en-us_topic_0000001150318493_row16994286017"><th class="cellrowborder" valign="top" width="11.119698579847357%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001150318493_p196991328500"><a name="en-us_topic_0000001150318493_p196991328500"></a><a name="en-us_topic_0000001150318493_p196991328500"></a>Name</p>
115</th>
116<th class="cellrowborder" valign="top" width="22.905999420345864%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001150318493_p156991028607"><a name="en-us_topic_0000001150318493_p156991028607"></a><a name="en-us_topic_0000001150318493_p156991028607"></a>Type</p>
117</th>
118<th class="cellrowborder" valign="top" width="6.762631629794225%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001150318493_p569920281005"><a name="en-us_topic_0000001150318493_p569920281005"></a><a name="en-us_topic_0000001150318493_p569920281005"></a>Mandatory</p>
119</th>
120<th class="cellrowborder" valign="top" width="59.211670370012556%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001150318493_p5699428800"><a name="en-us_topic_0000001150318493_p5699428800"></a><a name="en-us_topic_0000001150318493_p5699428800"></a>Description</p>
121</th>
122</tr>
123</thead>
124<tbody><tr id="en-us_topic_0000001150318493_row469912281801"><td class="cellrowborder" valign="top" width="11.119698579847357%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p46991028909"><a name="en-us_topic_0000001150318493_p46991028909"></a><a name="en-us_topic_0000001150318493_p46991028909"></a>bundleName</p>
125</td>
126<td class="cellrowborder" valign="top" width="22.905999420345864%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p469919282017"><a name="en-us_topic_0000001150318493_p469919282017"></a><a name="en-us_topic_0000001150318493_p469919282017"></a>string</p>
127</td>
128<td class="cellrowborder" valign="top" width="6.762631629794225%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p169982812013"><a name="en-us_topic_0000001150318493_p169982812013"></a><a name="en-us_topic_0000001150318493_p169982812013"></a>Yes</p>
129</td>
130<td class="cellrowborder" valign="top" width="59.211670370012556%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p569972818014"><a name="en-us_topic_0000001150318493_p569972818014"></a><a name="en-us_topic_0000001150318493_p569972818014"></a>Indicates the bundle name of the specified application.</p>
131</td>
132</tr>
133<tr id="en-us_topic_0000001150318493_row769982815012"><td class="cellrowborder" valign="top" width="11.119698579847357%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p10188114718716"><a name="en-us_topic_0000001150318493_p10188114718716"></a><a name="en-us_topic_0000001150318493_p10188114718716"></a>callback</p>
134</td>
135<td class="cellrowborder" valign="top" width="22.905999420345864%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p1518810471873"><a name="en-us_topic_0000001150318493_p1518810471873"></a><a name="en-us_topic_0000001150318493_p1518810471873"></a><a href="#en-us_topic_0000001150318493_section256244135613">AsyncCallback</a>&lt;<a href="#en-us_topic_0000001150318493_section137771134135415">ResourceManager</a>&gt;</p>
136</td>
137<td class="cellrowborder" valign="top" width="6.762631629794225%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p718813478713"><a name="en-us_topic_0000001150318493_p718813478713"></a><a name="en-us_topic_0000001150318493_p718813478713"></a>Yes</p>
138</td>
139<td class="cellrowborder" valign="top" width="59.211670370012556%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p1618844718710"><a name="en-us_topic_0000001150318493_p1618844718710"></a><a name="en-us_topic_0000001150318493_p1618844718710"></a>Indicates the callback containing the <strong id="en-us_topic_0000001150318493_b5121366013"><a name="en-us_topic_0000001150318493_b5121366013"></a><a name="en-us_topic_0000001150318493_b5121366013"></a>ResourceManager</strong> object.</p>
140</td>
141</tr>
142</tbody>
143</table>
144
145**Return Values**
146
147None.
148
149**Example**
150
151```
152resmgr.getResourceManager("com.example.myapplication", (error, mgr) => {
153}
154```
155
156## getResourceManager<a name="en-us_topic_0000001150318493_section0543541673"></a>
157
158Obtains the  **ResourceManager**  object of the current application.
159
160**Parameters**
161
162None.
163
164**Return Values**
165
166<a name="en-us_topic_0000001150318493_table125442040718"></a>
167<table><thead align="left"><tr id="en-us_topic_0000001150318493_row11545745715"><th class="cellrowborder" valign="top" width="21.19%" id="mcps1.1.3.1.1"><p id="en-us_topic_0000001150318493_p115451947716"><a name="en-us_topic_0000001150318493_p115451947716"></a><a name="en-us_topic_0000001150318493_p115451947716"></a>Type</p>
168</th>
169<th class="cellrowborder" valign="top" width="78.81%" id="mcps1.1.3.1.2"><p id="en-us_topic_0000001150318493_p15451043716"><a name="en-us_topic_0000001150318493_p15451043716"></a><a name="en-us_topic_0000001150318493_p15451043716"></a>Description</p>
170</th>
171</tr>
172</thead>
173<tbody><tr id="en-us_topic_0000001150318493_row55451841670"><td class="cellrowborder" valign="top" width="21.19%" headers="mcps1.1.3.1.1 "><p id="en-us_topic_0000001150318493_p135451841712"><a name="en-us_topic_0000001150318493_p135451841712"></a><a name="en-us_topic_0000001150318493_p135451841712"></a>Promise&lt;<a href="#en-us_topic_0000001150318493_section137771134135415">ResourceManager</a>&gt;</p>
174</td>
175<td class="cellrowborder" valign="top" width="78.81%" headers="mcps1.1.3.1.2 "><p id="en-us_topic_0000001150318493_p954512419714"><a name="en-us_topic_0000001150318493_p954512419714"></a><a name="en-us_topic_0000001150318493_p954512419714"></a>Indicates that the <strong id="en-us_topic_0000001150318493_b11718591325"><a name="en-us_topic_0000001150318493_b11718591325"></a><a name="en-us_topic_0000001150318493_b11718591325"></a>ResourceManager</strong> object is returned in Promise mode.</p>
176</td>
177</tr>
178</tbody>
179</table>
180
181**Example**
182
183```
184resmgr.getResourceManager().then(mgr => {
185    // callback
186    mgr.getString(0x1000000, (error, value) => {
187        if (error != null) {
188            console.log(value);
189        } else {
190            console.log(value);
191        }
192    });
193
194    // promise
195    mgr.getString(0x1000000).then(value => {
196        console.log(value);
197    }).catch(error => {
198        console.log("getstring promise " + error);
199    });
200}).catch(error => {
201
202});
203```
204
205## getResourceManager<a name="en-us_topic_0000001150318493_section1816951410716"></a>
206
207Obtains the  **ResourceManager**  object of the specified application.
208
209**Parameters**
210
211<a name="en-us_topic_0000001150318493_table6169161415710"></a>
212<table><thead align="left"><tr id="en-us_topic_0000001150318493_row141691914878"><th class="cellrowborder" valign="top" width="14.82%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001150318493_p191691114172"><a name="en-us_topic_0000001150318493_p191691114172"></a><a name="en-us_topic_0000001150318493_p191691114172"></a>Name</p>
213</th>
214<th class="cellrowborder" valign="top" width="14.729999999999999%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001150318493_p91690141774"><a name="en-us_topic_0000001150318493_p91690141774"></a><a name="en-us_topic_0000001150318493_p91690141774"></a>Type</p>
215</th>
216<th class="cellrowborder" valign="top" width="9.16%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001150318493_p1417013141074"><a name="en-us_topic_0000001150318493_p1417013141074"></a><a name="en-us_topic_0000001150318493_p1417013141074"></a>Mandatory</p>
217</th>
218<th class="cellrowborder" valign="top" width="61.29%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001150318493_p1117051418716"><a name="en-us_topic_0000001150318493_p1117051418716"></a><a name="en-us_topic_0000001150318493_p1117051418716"></a>Description</p>
219</th>
220</tr>
221</thead>
222<tbody><tr id="en-us_topic_0000001150318493_row1917061417717"><td class="cellrowborder" valign="top" width="14.82%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p16466037131616"><a name="en-us_topic_0000001150318493_p16466037131616"></a><a name="en-us_topic_0000001150318493_p16466037131616"></a>bundleName</p>
223</td>
224<td class="cellrowborder" valign="top" width="14.729999999999999%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p8466637101620"><a name="en-us_topic_0000001150318493_p8466637101620"></a><a name="en-us_topic_0000001150318493_p8466637101620"></a>string</p>
225</td>
226<td class="cellrowborder" valign="top" width="9.16%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p446633713162"><a name="en-us_topic_0000001150318493_p446633713162"></a><a name="en-us_topic_0000001150318493_p446633713162"></a>Yes</p>
227</td>
228<td class="cellrowborder" valign="top" width="61.29%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p1446633701612"><a name="en-us_topic_0000001150318493_p1446633701612"></a><a name="en-us_topic_0000001150318493_p1446633701612"></a>Indicates the bundle name of the specified application.</p>
229</td>
230</tr>
231</tbody>
232</table>
233
234**Return Values**
235
236<a name="en-us_topic_0000001150318493_table51715149717"></a>
237<table><thead align="left"><tr id="en-us_topic_0000001150318493_row717151413717"><th class="cellrowborder" valign="top" width="22.759999999999998%" id="mcps1.1.3.1.1"><p id="en-us_topic_0000001150318493_p917117141075"><a name="en-us_topic_0000001150318493_p917117141075"></a><a name="en-us_topic_0000001150318493_p917117141075"></a>Type</p>
238</th>
239<th class="cellrowborder" valign="top" width="77.24%" id="mcps1.1.3.1.2"><p id="en-us_topic_0000001150318493_p131716141778"><a name="en-us_topic_0000001150318493_p131716141778"></a><a name="en-us_topic_0000001150318493_p131716141778"></a>Description</p>
240</th>
241</tr>
242</thead>
243<tbody><tr id="en-us_topic_0000001150318493_row1417116141579"><td class="cellrowborder" valign="top" width="22.759999999999998%" headers="mcps1.1.3.1.1 "><p id="en-us_topic_0000001150318493_p1940551651713"><a name="en-us_topic_0000001150318493_p1940551651713"></a><a name="en-us_topic_0000001150318493_p1940551651713"></a>Promise&lt;<a href="#en-us_topic_0000001150318493_section137771134135415">ResourceManager</a>&gt;</p>
244</td>
245<td class="cellrowborder" valign="top" width="77.24%" headers="mcps1.1.3.1.2 "><p id="en-us_topic_0000001150318493_p140517164171"><a name="en-us_topic_0000001150318493_p140517164171"></a><a name="en-us_topic_0000001150318493_p140517164171"></a>Indicates that the <strong id="en-us_topic_0000001150318493_b866143712213"><a name="en-us_topic_0000001150318493_b866143712213"></a><a name="en-us_topic_0000001150318493_b866143712213"></a>ResourceManager</strong> object is returned in Promise mode.</p>
246</td>
247</tr>
248</tbody>
249</table>
250
251**Example**
252
253```
254resmgr.getResourceManager("com.example.myapplication").then(mgr => {
255
256}).catch(error => {
257
258});
259```
260
261## Enum<a name="en-us_topic_0000001150318493_section1978842154715"></a>
262
263## Direction<a name="en-us_topic_0000001150318493_section099619567453"></a>
264
265Enumerates screen directions
266
267<a name="en-us_topic_0000001150318493_table20633101642315"></a>
268<table><thead align="left"><tr id="en-us_topic_0000001150318493_row663331618238"><th class="cellrowborder" valign="top" width="27.900000000000002%" id="mcps1.1.4.1.1"><p id="en-us_topic_0000001150318493_a3d0fc780cc904c1cbab7991251622f65"><a name="en-us_topic_0000001150318493_a3d0fc780cc904c1cbab7991251622f65"></a><a name="en-us_topic_0000001150318493_a3d0fc780cc904c1cbab7991251622f65"></a>Name</p>
269</th>
270<th class="cellrowborder" valign="top" width="12.43%" id="mcps1.1.4.1.2"><p id="en-us_topic_0000001150318493_aace9cae4ba0d4939bfa048460f61c3c7"><a name="en-us_topic_0000001150318493_aace9cae4ba0d4939bfa048460f61c3c7"></a><a name="en-us_topic_0000001150318493_aace9cae4ba0d4939bfa048460f61c3c7"></a>Default Value</p>
271</th>
272<th class="cellrowborder" valign="top" width="59.67%" id="mcps1.1.4.1.3"><p id="en-us_topic_0000001150318493_afec895de33f94e3c87ee7acc20190a17"><a name="en-us_topic_0000001150318493_afec895de33f94e3c87ee7acc20190a17"></a><a name="en-us_topic_0000001150318493_afec895de33f94e3c87ee7acc20190a17"></a>Description</p>
273</th>
274</tr>
275</thead>
276<tbody><tr id="en-us_topic_0000001150318493_row188481425182510"><td class="cellrowborder" valign="top" width="27.900000000000002%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001150318493_p26821854218"><a name="en-us_topic_0000001150318493_p26821854218"></a><a name="en-us_topic_0000001150318493_p26821854218"></a>DIRECTION_VERTICAL</p>
277</td>
278<td class="cellrowborder" valign="top" width="12.43%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001150318493_p2282152962115"><a name="en-us_topic_0000001150318493_p2282152962115"></a><a name="en-us_topic_0000001150318493_p2282152962115"></a>0</p>
279</td>
280<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001150318493_p328012293211"><a name="en-us_topic_0000001150318493_p328012293211"></a><a name="en-us_topic_0000001150318493_p328012293211"></a>Indicates the vertical direction.</p>
281</td>
282</tr>
283<tr id="en-us_topic_0000001150318493_row0461622112513"><td class="cellrowborder" valign="top" width="27.900000000000002%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001150318493_p12106173918219"><a name="en-us_topic_0000001150318493_p12106173918219"></a><a name="en-us_topic_0000001150318493_p12106173918219"></a>DIRECTION_HORIZONTAL</p>
284</td>
285<td class="cellrowborder" valign="top" width="12.43%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001150318493_p1310553911218"><a name="en-us_topic_0000001150318493_p1310553911218"></a><a name="en-us_topic_0000001150318493_p1310553911218"></a>1</p>
286</td>
287<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001150318493_p15865395215"><a name="en-us_topic_0000001150318493_p15865395215"></a><a name="en-us_topic_0000001150318493_p15865395215"></a>Indicates the horizontal direction.</p>
288</td>
289</tr>
290</tbody>
291</table>
292
293## DeviceType<a name="en-us_topic_0000001150318493_section4734636131914"></a>
294
295Enumerates device types.
296
297<a name="en-us_topic_0000001150318493_table873411360193"></a>
298<table><thead align="left"><tr id="en-us_topic_0000001150318493_row187341036191911"><th class="cellrowborder" valign="top" width="27.900000000000002%" id="mcps1.1.4.1.1"><p id="en-us_topic_0000001150318493_p19735163661915"><a name="en-us_topic_0000001150318493_p19735163661915"></a><a name="en-us_topic_0000001150318493_p19735163661915"></a>Name</p>
299</th>
300<th class="cellrowborder" valign="top" width="12.43%" id="mcps1.1.4.1.2"><p id="en-us_topic_0000001150318493_p12735173661913"><a name="en-us_topic_0000001150318493_p12735173661913"></a><a name="en-us_topic_0000001150318493_p12735173661913"></a>Default Value</p>
301</th>
302<th class="cellrowborder" valign="top" width="59.67%" id="mcps1.1.4.1.3"><p id="en-us_topic_0000001150318493_p12735163611913"><a name="en-us_topic_0000001150318493_p12735163611913"></a><a name="en-us_topic_0000001150318493_p12735163611913"></a>Description</p>
303</th>
304</tr>
305</thead>
306<tbody><tr id="en-us_topic_0000001150318493_row19735113619194"><td class="cellrowborder" valign="top" width="27.900000000000002%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001150318493_p27351736111919"><a name="en-us_topic_0000001150318493_p27351736111919"></a><a name="en-us_topic_0000001150318493_p27351736111919"></a>DEVICE_TYPE_PHONE</p>
307</td>
308<td class="cellrowborder" valign="top" width="12.43%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001150318493_p137351636131917"><a name="en-us_topic_0000001150318493_p137351636131917"></a><a name="en-us_topic_0000001150318493_p137351636131917"></a>0x00</p>
309</td>
310<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001150318493_p1873543614192"><a name="en-us_topic_0000001150318493_p1873543614192"></a><a name="en-us_topic_0000001150318493_p1873543614192"></a>Indicates a phone.</p>
311</td>
312</tr>
313<tr id="en-us_topic_0000001150318493_row1956619491229"><td class="cellrowborder" valign="top" width="27.900000000000002%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001150318493_p1456634917225"><a name="en-us_topic_0000001150318493_p1456634917225"></a><a name="en-us_topic_0000001150318493_p1456634917225"></a>DEVICE_TYPE_TABLET</p>
314</td>
315<td class="cellrowborder" valign="top" width="12.43%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001150318493_p1256634982217"><a name="en-us_topic_0000001150318493_p1256634982217"></a><a name="en-us_topic_0000001150318493_p1256634982217"></a>0x01</p>
316</td>
317<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001150318493_p598213916331"><a name="en-us_topic_0000001150318493_p598213916331"></a><a name="en-us_topic_0000001150318493_p598213916331"></a>Indicates a tablet.</p>
318</td>
319</tr>
320<tr id="en-us_topic_0000001150318493_row57811744162211"><td class="cellrowborder" valign="top" width="27.900000000000002%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001150318493_p47820449225"><a name="en-us_topic_0000001150318493_p47820449225"></a><a name="en-us_topic_0000001150318493_p47820449225"></a>DEVICE_TYPE_CAR</p>
321</td>
322<td class="cellrowborder" valign="top" width="12.43%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001150318493_p1878244417224"><a name="en-us_topic_0000001150318493_p1878244417224"></a><a name="en-us_topic_0000001150318493_p1878244417224"></a>0x02</p>
323</td>
324<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001150318493_p378213446229"><a name="en-us_topic_0000001150318493_p378213446229"></a><a name="en-us_topic_0000001150318493_p378213446229"></a>Indicates a head unit.</p>
325</td>
326</tr>
327<tr id="en-us_topic_0000001150318493_row578284442218"><td class="cellrowborder" valign="top" width="27.900000000000002%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001150318493_p117821445229"><a name="en-us_topic_0000001150318493_p117821445229"></a><a name="en-us_topic_0000001150318493_p117821445229"></a>DEVICE_TYPE_PC</p>
328</td>
329<td class="cellrowborder" valign="top" width="12.43%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001150318493_p137821044172214"><a name="en-us_topic_0000001150318493_p137821044172214"></a><a name="en-us_topic_0000001150318493_p137821044172214"></a>0x03</p>
330</td>
331<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001150318493_p18782124422219"><a name="en-us_topic_0000001150318493_p18782124422219"></a><a name="en-us_topic_0000001150318493_p18782124422219"></a>Indicates a PC.</p>
332</td>
333</tr>
334<tr id="en-us_topic_0000001150318493_row84751140142210"><td class="cellrowborder" valign="top" width="27.900000000000002%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001150318493_p0475184014225"><a name="en-us_topic_0000001150318493_p0475184014225"></a><a name="en-us_topic_0000001150318493_p0475184014225"></a>DEVICE_TYPE_TV</p>
335</td>
336<td class="cellrowborder" valign="top" width="12.43%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001150318493_p1847519407228"><a name="en-us_topic_0000001150318493_p1847519407228"></a><a name="en-us_topic_0000001150318493_p1847519407228"></a>0x04</p>
337</td>
338<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001150318493_p44757409225"><a name="en-us_topic_0000001150318493_p44757409225"></a><a name="en-us_topic_0000001150318493_p44757409225"></a>Indicates a smart TV.</p>
339</td>
340</tr>
341<tr id="en-us_topic_0000001150318493_row9735736161917"><td class="cellrowborder" valign="top" width="27.900000000000002%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001150318493_p2073520364190"><a name="en-us_topic_0000001150318493_p2073520364190"></a><a name="en-us_topic_0000001150318493_p2073520364190"></a>DEVICE_TYPE_WEARABLE</p>
342</td>
343<td class="cellrowborder" valign="top" width="12.43%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001150318493_p1273683612191"><a name="en-us_topic_0000001150318493_p1273683612191"></a><a name="en-us_topic_0000001150318493_p1273683612191"></a>0x06</p>
344</td>
345<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001150318493_p1873653617198"><a name="en-us_topic_0000001150318493_p1873653617198"></a><a name="en-us_topic_0000001150318493_p1873653617198"></a>Indicates a wearable.</p>
346</td>
347</tr>
348</tbody>
349</table>
350
351## ScreenDensity<a name="en-us_topic_0000001150318493_section7331173812197"></a>
352
353Enumerates screen density types.
354
355<a name="en-us_topic_0000001150318493_table203311638181919"></a>
356<table><thead align="left"><tr id="en-us_topic_0000001150318493_row33311338101917"><th class="cellrowborder" valign="top" width="27.900000000000002%" id="mcps1.1.4.1.1"><p id="en-us_topic_0000001150318493_p733183811195"><a name="en-us_topic_0000001150318493_p733183811195"></a><a name="en-us_topic_0000001150318493_p733183811195"></a>Name</p>
357</th>
358<th class="cellrowborder" valign="top" width="12.43%" id="mcps1.1.4.1.2"><p id="en-us_topic_0000001150318493_p1331163810197"><a name="en-us_topic_0000001150318493_p1331163810197"></a><a name="en-us_topic_0000001150318493_p1331163810197"></a>Default Value</p>
359</th>
360<th class="cellrowborder" valign="top" width="59.67%" id="mcps1.1.4.1.3"><p id="en-us_topic_0000001150318493_p10331238191920"><a name="en-us_topic_0000001150318493_p10331238191920"></a><a name="en-us_topic_0000001150318493_p10331238191920"></a>Description</p>
361</th>
362</tr>
363</thead>
364<tbody><tr id="en-us_topic_0000001150318493_row19331163821912"><td class="cellrowborder" valign="top" width="27.900000000000002%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001150318493_p133311538131919"><a name="en-us_topic_0000001150318493_p133311538131919"></a><a name="en-us_topic_0000001150318493_p133311538131919"></a>SCREEN_SDPI</p>
365</td>
366<td class="cellrowborder" valign="top" width="12.43%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001150318493_p833113385195"><a name="en-us_topic_0000001150318493_p833113385195"></a><a name="en-us_topic_0000001150318493_p833113385195"></a>120</p>
367</td>
368<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001150318493_p1133133881918"><a name="en-us_topic_0000001150318493_p1133133881918"></a><a name="en-us_topic_0000001150318493_p1133133881918"></a>Indicates small screen density.</p>
369</td>
370</tr>
371<tr id="en-us_topic_0000001150318493_row1399293473011"><td class="cellrowborder" valign="top" width="27.900000000000002%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001150318493_p599213418300"><a name="en-us_topic_0000001150318493_p599213418300"></a><a name="en-us_topic_0000001150318493_p599213418300"></a>SCREEN_MDPI</p>
372</td>
373<td class="cellrowborder" valign="top" width="12.43%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001150318493_p1099210349304"><a name="en-us_topic_0000001150318493_p1099210349304"></a><a name="en-us_topic_0000001150318493_p1099210349304"></a>160</p>
374</td>
375<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001150318493_p139921534173016"><a name="en-us_topic_0000001150318493_p139921534173016"></a><a name="en-us_topic_0000001150318493_p139921534173016"></a>Indicates medium screen density.</p>
376</td>
377</tr>
378<tr id="en-us_topic_0000001150318493_row4841123016304"><td class="cellrowborder" valign="top" width="27.900000000000002%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001150318493_p188417305309"><a name="en-us_topic_0000001150318493_p188417305309"></a><a name="en-us_topic_0000001150318493_p188417305309"></a>SCREEN_LDPI</p>
379</td>
380<td class="cellrowborder" valign="top" width="12.43%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001150318493_p10841193014308"><a name="en-us_topic_0000001150318493_p10841193014308"></a><a name="en-us_topic_0000001150318493_p10841193014308"></a>240</p>
381</td>
382<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001150318493_p1084116309304"><a name="en-us_topic_0000001150318493_p1084116309304"></a><a name="en-us_topic_0000001150318493_p1084116309304"></a>Indicates large screen density.</p>
383</td>
384</tr>
385<tr id="en-us_topic_0000001150318493_row1784163013302"><td class="cellrowborder" valign="top" width="27.900000000000002%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001150318493_p48413309304"><a name="en-us_topic_0000001150318493_p48413309304"></a><a name="en-us_topic_0000001150318493_p48413309304"></a>SCREEN_XLDPI</p>
386</td>
387<td class="cellrowborder" valign="top" width="12.43%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001150318493_p128411930183011"><a name="en-us_topic_0000001150318493_p128411930183011"></a><a name="en-us_topic_0000001150318493_p128411930183011"></a>320</p>
388</td>
389<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001150318493_p084110301309"><a name="en-us_topic_0000001150318493_p084110301309"></a><a name="en-us_topic_0000001150318493_p084110301309"></a>Indicates extra-large screen density.</p>
390</td>
391</tr>
392<tr id="en-us_topic_0000001150318493_row1084092610308"><td class="cellrowborder" valign="top" width="27.900000000000002%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001150318493_p128411926173012"><a name="en-us_topic_0000001150318493_p128411926173012"></a><a name="en-us_topic_0000001150318493_p128411926173012"></a>SCREEN_XXLDPI</p>
393</td>
394<td class="cellrowborder" valign="top" width="12.43%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001150318493_p884192693019"><a name="en-us_topic_0000001150318493_p884192693019"></a><a name="en-us_topic_0000001150318493_p884192693019"></a>480</p>
395</td>
396<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001150318493_p6841226163015"><a name="en-us_topic_0000001150318493_p6841226163015"></a><a name="en-us_topic_0000001150318493_p6841226163015"></a>Indicates extra-extra-large screen density.</p>
397</td>
398</tr>
399<tr id="en-us_topic_0000001150318493_row11331163891916"><td class="cellrowborder" valign="top" width="27.900000000000002%" headers="mcps1.1.4.1.1 "><p id="en-us_topic_0000001150318493_p14331163861914"><a name="en-us_topic_0000001150318493_p14331163861914"></a><a name="en-us_topic_0000001150318493_p14331163861914"></a>SCREEN_XXXLDPI</p>
400</td>
401<td class="cellrowborder" valign="top" width="12.43%" headers="mcps1.1.4.1.2 "><p id="en-us_topic_0000001150318493_p933115383192"><a name="en-us_topic_0000001150318493_p933115383192"></a><a name="en-us_topic_0000001150318493_p933115383192"></a>640</p>
402</td>
403<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="en-us_topic_0000001150318493_p23321138141912"><a name="en-us_topic_0000001150318493_p23321138141912"></a><a name="en-us_topic_0000001150318493_p23321138141912"></a>Indicates extra-extra-extra-large screen density.</p>
404</td>
405</tr>
406</tbody>
407</table>
408
409## Appendix<a name="en-us_topic_0000001150318493_section1933416317165"></a>
410
411## AsyncCallback<T\><a name="en-us_topic_0000001150318493_section256244135613"></a>
412
413<a name="en-us_topic_0000001150318493_table0103172561814"></a>
414<table><thead align="left"><tr id="en-us_topic_0000001150318493_row12103152513185"><th class="cellrowborder" valign="top" width="17.931793179317932%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001150318493_p1610322561817"><a name="en-us_topic_0000001150318493_p1610322561817"></a><a name="en-us_topic_0000001150318493_p1610322561817"></a>Name</p>
415</th>
416<th class="cellrowborder" valign="top" width="12.271227122712272%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001150318493_p20103132551816"><a name="en-us_topic_0000001150318493_p20103132551816"></a><a name="en-us_topic_0000001150318493_p20103132551816"></a>Parameter Type</p>
417</th>
418<th class="cellrowborder" valign="top" width="10.551055105510551%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001150318493_p1103172518188"><a name="en-us_topic_0000001150318493_p1103172518188"></a><a name="en-us_topic_0000001150318493_p1103172518188"></a>Mandatory</p>
419</th>
420<th class="cellrowborder" valign="top" width="59.245924592459254%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001150318493_p19103125141812"><a name="en-us_topic_0000001150318493_p19103125141812"></a><a name="en-us_topic_0000001150318493_p19103125141812"></a>Description</p>
421</th>
422</tr>
423</thead>
424<tbody><tr id="en-us_topic_0000001150318493_row201031125101812"><td class="cellrowborder" valign="top" width="17.931793179317932%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p293518218251"><a name="en-us_topic_0000001150318493_p293518218251"></a><a name="en-us_topic_0000001150318493_p293518218251"></a>error</p>
425</td>
426<td class="cellrowborder" valign="top" width="12.271227122712272%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p39351925253"><a name="en-us_topic_0000001150318493_p39351925253"></a><a name="en-us_topic_0000001150318493_p39351925253"></a>Error</p>
427</td>
428<td class="cellrowborder" valign="top" width="10.551055105510551%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p8935162182512"><a name="en-us_topic_0000001150318493_p8935162182512"></a><a name="en-us_topic_0000001150318493_p8935162182512"></a>No</p>
429</td>
430<td class="cellrowborder" valign="top" width="59.245924592459254%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p109351224253"><a name="en-us_topic_0000001150318493_p109351224253"></a><a name="en-us_topic_0000001150318493_p109351224253"></a>Returns an error if an exception is thrown during execution; returns an empty value otherwise.</p>
431</td>
432</tr>
433<tr id="en-us_topic_0000001150318493_row750201314232"><td class="cellrowborder" valign="top" width="17.931793179317932%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p5501413112313"><a name="en-us_topic_0000001150318493_p5501413112313"></a><a name="en-us_topic_0000001150318493_p5501413112313"></a>data</p>
434</td>
435<td class="cellrowborder" valign="top" width="12.271227122712272%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p7501313142310"><a name="en-us_topic_0000001150318493_p7501313142310"></a><a name="en-us_topic_0000001150318493_p7501313142310"></a>T</p>
436</td>
437<td class="cellrowborder" valign="top" width="10.551055105510551%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p550141313239"><a name="en-us_topic_0000001150318493_p550141313239"></a><a name="en-us_topic_0000001150318493_p550141313239"></a>No</p>
438</td>
439<td class="cellrowborder" valign="top" width="59.245924592459254%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p750191318235"><a name="en-us_topic_0000001150318493_p750191318235"></a><a name="en-us_topic_0000001150318493_p750191318235"></a>Returns a T object if the execution is successful; returns an empty value otherwise.</p>
440</td>
441</tr>
442</tbody>
443</table>
444
445## Configuration<a name="en-us_topic_0000001150318493_section12882825611"></a>
446
447Provides the device configuration.
448
449### Attributes<a name="en-us_topic_0000001150318493_section1059684317312"></a>
450
451<a name="en-us_topic_0000001150318493_table1459620431636"></a>
452<table><thead align="left"><tr id="en-us_topic_0000001150318493_row25971143435"><th class="cellrowborder" valign="top" width="15.870000000000001%" id="mcps1.1.6.1.1"><p id="en-us_topic_0000001150318493_p1559716434320"><a name="en-us_topic_0000001150318493_p1559716434320"></a><a name="en-us_topic_0000001150318493_p1559716434320"></a>Name</p>
453</th>
454<th class="cellrowborder" valign="top" width="10.86%" id="mcps1.1.6.1.2"><p id="en-us_topic_0000001150318493_p3597743539"><a name="en-us_topic_0000001150318493_p3597743539"></a><a name="en-us_topic_0000001150318493_p3597743539"></a>Parameter Type</p>
455</th>
456<th class="cellrowborder" valign="top" width="9.34%" id="mcps1.1.6.1.3"><p id="en-us_topic_0000001150318493_p15971343131"><a name="en-us_topic_0000001150318493_p15971343131"></a><a name="en-us_topic_0000001150318493_p15971343131"></a>Readable</p>
457</th>
458<th class="cellrowborder" valign="top" width="11.51%" id="mcps1.1.6.1.4"><p id="en-us_topic_0000001150318493_p1459715436311"><a name="en-us_topic_0000001150318493_p1459715436311"></a><a name="en-us_topic_0000001150318493_p1459715436311"></a>Writable</p>
459</th>
460<th class="cellrowborder" valign="top" width="52.42%" id="mcps1.1.6.1.5"><p id="en-us_topic_0000001150318493_p75975439316"><a name="en-us_topic_0000001150318493_p75975439316"></a><a name="en-us_topic_0000001150318493_p75975439316"></a>Description</p>
461</th>
462</tr>
463</thead>
464<tbody><tr id="en-us_topic_0000001150318493_row95971943839"><td class="cellrowborder" valign="top" width="15.870000000000001%" headers="mcps1.1.6.1.1 "><p id="en-us_topic_0000001150318493_p85976431431"><a name="en-us_topic_0000001150318493_p85976431431"></a><a name="en-us_topic_0000001150318493_p85976431431"></a>direction</p>
465</td>
466<td class="cellrowborder" valign="top" width="10.86%" headers="mcps1.1.6.1.2 "><p id="en-us_topic_0000001150318493_p2059710431030"><a name="en-us_topic_0000001150318493_p2059710431030"></a><a name="en-us_topic_0000001150318493_p2059710431030"></a><a href="#en-us_topic_0000001150318493_section099619567453">Direction</a></p>
467</td>
468<td class="cellrowborder" valign="top" width="9.34%" headers="mcps1.1.6.1.3 "><p id="en-us_topic_0000001150318493_p1059711439317"><a name="en-us_topic_0000001150318493_p1059711439317"></a><a name="en-us_topic_0000001150318493_p1059711439317"></a>Yes</p>
469</td>
470<td class="cellrowborder" valign="top" width="11.51%" headers="mcps1.1.6.1.4 "><p id="en-us_topic_0000001150318493_p659715430317"><a name="en-us_topic_0000001150318493_p659715430317"></a><a name="en-us_topic_0000001150318493_p659715430317"></a>No</p>
471</td>
472<td class="cellrowborder" valign="top" width="52.42%" headers="mcps1.1.6.1.5 "><p id="en-us_topic_0000001150318493_p2059719436313"><a name="en-us_topic_0000001150318493_p2059719436313"></a><a name="en-us_topic_0000001150318493_p2059719436313"></a>Indicates the screen direction of the current device.</p>
473</td>
474</tr>
475<tr id="en-us_topic_0000001150318493_row185973435316"><td class="cellrowborder" valign="top" width="15.870000000000001%" headers="mcps1.1.6.1.1 "><p id="en-us_topic_0000001150318493_p1559710432310"><a name="en-us_topic_0000001150318493_p1559710432310"></a><a name="en-us_topic_0000001150318493_p1559710432310"></a>locale</p>
476</td>
477<td class="cellrowborder" valign="top" width="10.86%" headers="mcps1.1.6.1.2 "><p id="en-us_topic_0000001150318493_p16597144318312"><a name="en-us_topic_0000001150318493_p16597144318312"></a><a name="en-us_topic_0000001150318493_p16597144318312"></a>string</p>
478</td>
479<td class="cellrowborder" valign="top" width="9.34%" headers="mcps1.1.6.1.3 "><p id="en-us_topic_0000001150318493_p12597194313317"><a name="en-us_topic_0000001150318493_p12597194313317"></a><a name="en-us_topic_0000001150318493_p12597194313317"></a>Yes</p>
480</td>
481<td class="cellrowborder" valign="top" width="11.51%" headers="mcps1.1.6.1.4 "><p id="en-us_topic_0000001150318493_p1259710431236"><a name="en-us_topic_0000001150318493_p1259710431236"></a><a name="en-us_topic_0000001150318493_p1259710431236"></a>No</p>
482</td>
483<td class="cellrowborder" valign="top" width="52.42%" headers="mcps1.1.6.1.5 "><p id="en-us_topic_0000001150318493_p10597843034"><a name="en-us_topic_0000001150318493_p10597843034"></a><a name="en-us_topic_0000001150318493_p10597843034"></a>Indicates the current system language, for example, zh-Hans-CN.</p>
484</td>
485</tr>
486</tbody>
487</table>
488
489## DeviceCapability<a name="en-us_topic_0000001150318493_section7200123494410"></a>
490
491Provides the device capability.
492
493### Attributes<a name="en-us_topic_0000001150318493_section2201153419440"></a>
494
495<a name="en-us_topic_0000001150318493_table16201103444414"></a>
496<table><thead align="left"><tr id="en-us_topic_0000001150318493_row620123444415"><th class="cellrowborder" valign="top" width="15.870000000000001%" id="mcps1.1.6.1.1"><p id="en-us_topic_0000001150318493_p1620163494418"><a name="en-us_topic_0000001150318493_p1620163494418"></a><a name="en-us_topic_0000001150318493_p1620163494418"></a>Name</p>
497</th>
498<th class="cellrowborder" valign="top" width="10.86%" id="mcps1.1.6.1.2"><p id="en-us_topic_0000001150318493_p15201434124418"><a name="en-us_topic_0000001150318493_p15201434124418"></a><a name="en-us_topic_0000001150318493_p15201434124418"></a>Parameter Type</p>
499</th>
500<th class="cellrowborder" valign="top" width="9.34%" id="mcps1.1.6.1.3"><p id="en-us_topic_0000001150318493_p13201123484412"><a name="en-us_topic_0000001150318493_p13201123484412"></a><a name="en-us_topic_0000001150318493_p13201123484412"></a>Readable</p>
501</th>
502<th class="cellrowborder" valign="top" width="11.51%" id="mcps1.1.6.1.4"><p id="en-us_topic_0000001150318493_p1320123412448"><a name="en-us_topic_0000001150318493_p1320123412448"></a><a name="en-us_topic_0000001150318493_p1320123412448"></a>Writable</p>
503</th>
504<th class="cellrowborder" valign="top" width="52.42%" id="mcps1.1.6.1.5"><p id="en-us_topic_0000001150318493_p9201934134419"><a name="en-us_topic_0000001150318493_p9201934134419"></a><a name="en-us_topic_0000001150318493_p9201934134419"></a>Description</p>
505</th>
506</tr>
507</thead>
508<tbody><tr id="en-us_topic_0000001150318493_row3201103494415"><td class="cellrowborder" valign="top" width="15.870000000000001%" headers="mcps1.1.6.1.1 "><p id="en-us_topic_0000001150318493_p20826502499"><a name="en-us_topic_0000001150318493_p20826502499"></a><a name="en-us_topic_0000001150318493_p20826502499"></a>screenDensity</p>
509</td>
510<td class="cellrowborder" valign="top" width="10.86%" headers="mcps1.1.6.1.2 "><p id="en-us_topic_0000001150318493_p120143413448"><a name="en-us_topic_0000001150318493_p120143413448"></a><a name="en-us_topic_0000001150318493_p120143413448"></a><a href="#en-us_topic_0000001150318493_section7331173812197">ScreenDensity</a></p>
511</td>
512<td class="cellrowborder" valign="top" width="9.34%" headers="mcps1.1.6.1.3 "><p id="en-us_topic_0000001150318493_p18201334114417"><a name="en-us_topic_0000001150318493_p18201334114417"></a><a name="en-us_topic_0000001150318493_p18201334114417"></a>Yes</p>
513</td>
514<td class="cellrowborder" valign="top" width="11.51%" headers="mcps1.1.6.1.4 "><p id="en-us_topic_0000001150318493_p420113347441"><a name="en-us_topic_0000001150318493_p420113347441"></a><a name="en-us_topic_0000001150318493_p420113347441"></a>No</p>
515</td>
516<td class="cellrowborder" valign="top" width="52.42%" headers="mcps1.1.6.1.5 "><p id="en-us_topic_0000001150318493_p202021934134412"><a name="en-us_topic_0000001150318493_p202021934134412"></a><a name="en-us_topic_0000001150318493_p202021934134412"></a>Indicates the screen density of the current device.</p>
517</td>
518</tr>
519<tr id="en-us_topic_0000001150318493_row19202113413445"><td class="cellrowborder" valign="top" width="15.870000000000001%" headers="mcps1.1.6.1.1 "><p id="en-us_topic_0000001150318493_p82028341442"><a name="en-us_topic_0000001150318493_p82028341442"></a><a name="en-us_topic_0000001150318493_p82028341442"></a>deviceType</p>
520</td>
521<td class="cellrowborder" valign="top" width="10.86%" headers="mcps1.1.6.1.2 "><p id="en-us_topic_0000001150318493_p62021434104413"><a name="en-us_topic_0000001150318493_p62021434104413"></a><a name="en-us_topic_0000001150318493_p62021434104413"></a><a href="#en-us_topic_0000001150318493_section4734636131914">DeviceType</a></p>
522</td>
523<td class="cellrowborder" valign="top" width="9.34%" headers="mcps1.1.6.1.3 "><p id="en-us_topic_0000001150318493_p142021134164413"><a name="en-us_topic_0000001150318493_p142021134164413"></a><a name="en-us_topic_0000001150318493_p142021134164413"></a>Yes</p>
524</td>
525<td class="cellrowborder" valign="top" width="11.51%" headers="mcps1.1.6.1.4 "><p id="en-us_topic_0000001150318493_p22021834104417"><a name="en-us_topic_0000001150318493_p22021834104417"></a><a name="en-us_topic_0000001150318493_p22021834104417"></a>No</p>
526</td>
527<td class="cellrowborder" valign="top" width="52.42%" headers="mcps1.1.6.1.5 "><p id="en-us_topic_0000001150318493_p112021341446"><a name="en-us_topic_0000001150318493_p112021341446"></a><a name="en-us_topic_0000001150318493_p112021341446"></a>Indicates the type of the current device.</p>
528</td>
529</tr>
530</tbody>
531</table>
532
533## ResourceManager<a name="en-us_topic_0000001150318493_section137771134135415"></a>
534
535Provides the capability of accessing application resources.
536
537### getString<a name="en-us_topic_0000001150318493_section9779153419548"></a>
538
539Obtains the character string corresponding to a specified resource ID in callback mode.
540
541**Parameters**
542
543<a name="en-us_topic_0000001150318493_table15779123455418"></a>
544<table><thead align="left"><tr id="en-us_topic_0000001150318493_row37791234125419"><th class="cellrowborder" valign="top" width="9.07%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001150318493_p1778018347547"><a name="en-us_topic_0000001150318493_p1778018347547"></a><a name="en-us_topic_0000001150318493_p1778018347547"></a>Name</p>
545</th>
546<th class="cellrowborder" valign="top" width="20.48%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001150318493_p12780113475417"><a name="en-us_topic_0000001150318493_p12780113475417"></a><a name="en-us_topic_0000001150318493_p12780113475417"></a>Type</p>
547</th>
548<th class="cellrowborder" valign="top" width="9.16%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001150318493_p137801834145410"><a name="en-us_topic_0000001150318493_p137801834145410"></a><a name="en-us_topic_0000001150318493_p137801834145410"></a>Mandatory</p>
549</th>
550<th class="cellrowborder" valign="top" width="61.29%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001150318493_p1678053465414"><a name="en-us_topic_0000001150318493_p1678053465414"></a><a name="en-us_topic_0000001150318493_p1678053465414"></a>Description</p>
551</th>
552</tr>
553</thead>
554<tbody><tr id="en-us_topic_0000001150318493_row478015349541"><td class="cellrowborder" valign="top" width="9.07%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p1978013410544"><a name="en-us_topic_0000001150318493_p1978013410544"></a><a name="en-us_topic_0000001150318493_p1978013410544"></a>resId</p>
555</td>
556<td class="cellrowborder" valign="top" width="20.48%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p13780123410542"><a name="en-us_topic_0000001150318493_p13780123410542"></a><a name="en-us_topic_0000001150318493_p13780123410542"></a>number</p>
557</td>
558<td class="cellrowborder" valign="top" width="9.16%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p14780334145419"><a name="en-us_topic_0000001150318493_p14780334145419"></a><a name="en-us_topic_0000001150318493_p14780334145419"></a>Yes</p>
559</td>
560<td class="cellrowborder" valign="top" width="61.29%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p97801934185415"><a name="en-us_topic_0000001150318493_p97801934185415"></a><a name="en-us_topic_0000001150318493_p97801934185415"></a>Indicates the resource ID.</p>
561</td>
562</tr>
563<tr id="en-us_topic_0000001150318493_row5780334175417"><td class="cellrowborder" valign="top" width="9.07%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p1780113413548"><a name="en-us_topic_0000001150318493_p1780113413548"></a><a name="en-us_topic_0000001150318493_p1780113413548"></a>callback</p>
564</td>
565<td class="cellrowborder" valign="top" width="20.48%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p5127248143016"><a name="en-us_topic_0000001150318493_p5127248143016"></a><a name="en-us_topic_0000001150318493_p5127248143016"></a><a href="#en-us_topic_0000001150318493_section256244135613">AsyncCallback</a>&lt;string&gt;</p>
566</td>
567<td class="cellrowborder" valign="top" width="9.16%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p778003485413"><a name="en-us_topic_0000001150318493_p778003485413"></a><a name="en-us_topic_0000001150318493_p778003485413"></a>Yes</p>
568</td>
569<td class="cellrowborder" valign="top" width="61.29%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p137801834105419"><a name="en-us_topic_0000001150318493_p137801834105419"></a><a name="en-us_topic_0000001150318493_p137801834105419"></a>Indicates the asynchronous callback used to return the obtained character string.</p>
570</td>
571</tr>
572</tbody>
573</table>
574
575**Return Values**
576
577None.
578
579### getString<a name="en-us_topic_0000001150318493_section159261924165411"></a>
580
581Obtains string resources associated with a specified resource ID in Promise mode.
582
583**Parameters**
584
585<a name="en-us_topic_0000001150318493_table209261824205420"></a>
586<table><thead align="left"><tr id="en-us_topic_0000001150318493_row1492722415415"><th class="cellrowborder" valign="top" width="14.82%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001150318493_p1692782416547"><a name="en-us_topic_0000001150318493_p1692782416547"></a><a name="en-us_topic_0000001150318493_p1692782416547"></a>Name</p>
587</th>
588<th class="cellrowborder" valign="top" width="14.729999999999999%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001150318493_p189271240541"><a name="en-us_topic_0000001150318493_p189271240541"></a><a name="en-us_topic_0000001150318493_p189271240541"></a>Type</p>
589</th>
590<th class="cellrowborder" valign="top" width="9.16%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001150318493_p199271824205415"><a name="en-us_topic_0000001150318493_p199271824205415"></a><a name="en-us_topic_0000001150318493_p199271824205415"></a>Mandatory</p>
591</th>
592<th class="cellrowborder" valign="top" width="61.29%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001150318493_p109270241547"><a name="en-us_topic_0000001150318493_p109270241547"></a><a name="en-us_topic_0000001150318493_p109270241547"></a>Description</p>
593</th>
594</tr>
595</thead>
596<tbody><tr id="en-us_topic_0000001150318493_row2927132413546"><td class="cellrowborder" valign="top" width="14.82%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p135781232358"><a name="en-us_topic_0000001150318493_p135781232358"></a><a name="en-us_topic_0000001150318493_p135781232358"></a>resId</p>
597</td>
598<td class="cellrowborder" valign="top" width="14.729999999999999%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p195781383513"><a name="en-us_topic_0000001150318493_p195781383513"></a><a name="en-us_topic_0000001150318493_p195781383513"></a>number</p>
599</td>
600<td class="cellrowborder" valign="top" width="9.16%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p16578439358"><a name="en-us_topic_0000001150318493_p16578439358"></a><a name="en-us_topic_0000001150318493_p16578439358"></a>Yes</p>
601</td>
602<td class="cellrowborder" valign="top" width="61.29%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p135783310357"><a name="en-us_topic_0000001150318493_p135783310357"></a><a name="en-us_topic_0000001150318493_p135783310357"></a>Indicates the resource ID.</p>
603</td>
604</tr>
605</tbody>
606</table>
607
608**Return Values**
609
610<a name="en-us_topic_0000001150318493_table1492913246542"></a>
611<table><thead align="left"><tr id="en-us_topic_0000001150318493_row169291824135411"><th class="cellrowborder" valign="top" width="17.01%" id="mcps1.1.3.1.1"><p id="en-us_topic_0000001150318493_p15929132485415"><a name="en-us_topic_0000001150318493_p15929132485415"></a><a name="en-us_topic_0000001150318493_p15929132485415"></a>Type</p>
612</th>
613<th class="cellrowborder" valign="top" width="82.99%" id="mcps1.1.3.1.2"><p id="en-us_topic_0000001150318493_p392918245541"><a name="en-us_topic_0000001150318493_p392918245541"></a><a name="en-us_topic_0000001150318493_p392918245541"></a>Description</p>
614</th>
615</tr>
616</thead>
617<tbody><tr id="en-us_topic_0000001150318493_row1592992455414"><td class="cellrowborder" valign="top" width="17.01%" headers="mcps1.1.3.1.1 "><p id="en-us_topic_0000001150318493_p179291924135420"><a name="en-us_topic_0000001150318493_p179291924135420"></a><a name="en-us_topic_0000001150318493_p179291924135420"></a>Promise&lt;string&gt;</p>
618</td>
619<td class="cellrowborder" valign="top" width="82.99%" headers="mcps1.1.3.1.2 "><p id="en-us_topic_0000001150318493_p17929142485416"><a name="en-us_topic_0000001150318493_p17929142485416"></a><a name="en-us_topic_0000001150318493_p17929142485416"></a>Indicates the character string corresponding to the resource ID.</p>
620</td>
621</tr>
622</tbody>
623</table>
624
625### getStringArray<a name="en-us_topic_0000001150318493_section4490132775420"></a>
626
627Obtains the array of character strings corresponding to a specified resource ID in callback mode.
628
629**Parameters**
630
631<a name="en-us_topic_0000001150318493_table104901227185415"></a>
632<table><thead align="left"><tr id="en-us_topic_0000001150318493_row1849042719548"><th class="cellrowborder" valign="top" width="8.110000000000001%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001150318493_p2491727195416"><a name="en-us_topic_0000001150318493_p2491727195416"></a><a name="en-us_topic_0000001150318493_p2491727195416"></a>Name</p>
633</th>
634<th class="cellrowborder" valign="top" width="21.44%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001150318493_p449122775413"><a name="en-us_topic_0000001150318493_p449122775413"></a><a name="en-us_topic_0000001150318493_p449122775413"></a>Type</p>
635</th>
636<th class="cellrowborder" valign="top" width="9.16%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001150318493_p549117275549"><a name="en-us_topic_0000001150318493_p549117275549"></a><a name="en-us_topic_0000001150318493_p549117275549"></a>Mandatory</p>
637</th>
638<th class="cellrowborder" valign="top" width="61.29%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001150318493_p4491152716543"><a name="en-us_topic_0000001150318493_p4491152716543"></a><a name="en-us_topic_0000001150318493_p4491152716543"></a>Description</p>
639</th>
640</tr>
641</thead>
642<tbody><tr id="en-us_topic_0000001150318493_row84911027155414"><td class="cellrowborder" valign="top" width="8.110000000000001%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p1738472410372"><a name="en-us_topic_0000001150318493_p1738472410372"></a><a name="en-us_topic_0000001150318493_p1738472410372"></a>resId</p>
643</td>
644<td class="cellrowborder" valign="top" width="21.44%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p1438462419379"><a name="en-us_topic_0000001150318493_p1438462419379"></a><a name="en-us_topic_0000001150318493_p1438462419379"></a>number</p>
645</td>
646<td class="cellrowborder" valign="top" width="9.16%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p13841524203711"><a name="en-us_topic_0000001150318493_p13841524203711"></a><a name="en-us_topic_0000001150318493_p13841524203711"></a>Yes</p>
647</td>
648<td class="cellrowborder" valign="top" width="61.29%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p8384142493715"><a name="en-us_topic_0000001150318493_p8384142493715"></a><a name="en-us_topic_0000001150318493_p8384142493715"></a>Indicates the resource ID.</p>
649</td>
650</tr>
651<tr id="en-us_topic_0000001150318493_row4491142717542"><td class="cellrowborder" valign="top" width="8.110000000000001%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p11384142443715"><a name="en-us_topic_0000001150318493_p11384142443715"></a><a name="en-us_topic_0000001150318493_p11384142443715"></a>callback</p>
652</td>
653<td class="cellrowborder" valign="top" width="21.44%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p1538472473719"><a name="en-us_topic_0000001150318493_p1538472473719"></a><a name="en-us_topic_0000001150318493_p1538472473719"></a><a href="#en-us_topic_0000001150318493_section256244135613">AsyncCallback</a>&lt;Array&lt;string&gt;&gt;</p>
654</td>
655<td class="cellrowborder" valign="top" width="9.16%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p18384132473713"><a name="en-us_topic_0000001150318493_p18384132473713"></a><a name="en-us_topic_0000001150318493_p18384132473713"></a>Yes</p>
656</td>
657<td class="cellrowborder" valign="top" width="61.29%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p8384132411379"><a name="en-us_topic_0000001150318493_p8384132411379"></a><a name="en-us_topic_0000001150318493_p8384132411379"></a>Indicates the asynchronous callback used to return the obtained array of character strings.</p>
658</td>
659</tr>
660</tbody>
661</table>
662
663**Return Values**
664
665None.
666
667### getStringArray<a name="en-us_topic_0000001150318493_section1992322017541"></a>
668
669Obtains the array of character strings corresponding to a specified resource ID in Promise mode.
670
671**Parameters**
672
673<a name="en-us_topic_0000001150318493_table11924132005411"></a>
674<table><thead align="left"><tr id="en-us_topic_0000001150318493_row13924172017543"><th class="cellrowborder" valign="top" width="14.82%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001150318493_p1392442016541"><a name="en-us_topic_0000001150318493_p1392442016541"></a><a name="en-us_topic_0000001150318493_p1392442016541"></a>Name</p>
675</th>
676<th class="cellrowborder" valign="top" width="14.729999999999999%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001150318493_p0924920145417"><a name="en-us_topic_0000001150318493_p0924920145417"></a><a name="en-us_topic_0000001150318493_p0924920145417"></a>Type</p>
677</th>
678<th class="cellrowborder" valign="top" width="9.16%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001150318493_p392452011549"><a name="en-us_topic_0000001150318493_p392452011549"></a><a name="en-us_topic_0000001150318493_p392452011549"></a>Mandatory</p>
679</th>
680<th class="cellrowborder" valign="top" width="61.29%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001150318493_p1992492065414"><a name="en-us_topic_0000001150318493_p1992492065414"></a><a name="en-us_topic_0000001150318493_p1992492065414"></a>Description</p>
681</th>
682</tr>
683</thead>
684<tbody><tr id="en-us_topic_0000001150318493_row15924220135414"><td class="cellrowborder" valign="top" width="14.82%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p1451111743917"><a name="en-us_topic_0000001150318493_p1451111743917"></a><a name="en-us_topic_0000001150318493_p1451111743917"></a>resId</p>
685</td>
686<td class="cellrowborder" valign="top" width="14.729999999999999%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p9511157113911"><a name="en-us_topic_0000001150318493_p9511157113911"></a><a name="en-us_topic_0000001150318493_p9511157113911"></a>number</p>
687</td>
688<td class="cellrowborder" valign="top" width="9.16%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p195117718397"><a name="en-us_topic_0000001150318493_p195117718397"></a><a name="en-us_topic_0000001150318493_p195117718397"></a>Yes</p>
689</td>
690<td class="cellrowborder" valign="top" width="61.29%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p151119713915"><a name="en-us_topic_0000001150318493_p151119713915"></a><a name="en-us_topic_0000001150318493_p151119713915"></a>Indicates the resource ID.</p>
691</td>
692</tr>
693</tbody>
694</table>
695
696**Return Values**
697
698<a name="en-us_topic_0000001150318493_table1492552055418"></a>
699<table><thead align="left"><tr id="en-us_topic_0000001150318493_row20925132035420"><th class="cellrowborder" valign="top" width="20.05%" id="mcps1.1.3.1.1"><p id="en-us_topic_0000001150318493_p10925202010544"><a name="en-us_topic_0000001150318493_p10925202010544"></a><a name="en-us_topic_0000001150318493_p10925202010544"></a>Type</p>
700</th>
701<th class="cellrowborder" valign="top" width="79.95%" id="mcps1.1.3.1.2"><p id="en-us_topic_0000001150318493_p129269201544"><a name="en-us_topic_0000001150318493_p129269201544"></a><a name="en-us_topic_0000001150318493_p129269201544"></a>Description</p>
702</th>
703</tr>
704</thead>
705<tbody><tr id="en-us_topic_0000001150318493_row119261820145419"><td class="cellrowborder" valign="top" width="20.05%" headers="mcps1.1.3.1.1 "><p id="en-us_topic_0000001150318493_p179309445393"><a name="en-us_topic_0000001150318493_p179309445393"></a><a name="en-us_topic_0000001150318493_p179309445393"></a>Promise&lt;Array&lt;string&gt;&gt;</p>
706</td>
707<td class="cellrowborder" valign="top" width="79.95%" headers="mcps1.1.3.1.2 "><p id="en-us_topic_0000001150318493_p139301144153915"><a name="en-us_topic_0000001150318493_p139301144153915"></a><a name="en-us_topic_0000001150318493_p139301144153915"></a>Indicates the array of character strings corresponding to the specified resource ID.</p>
708</td>
709</tr>
710</tbody>
711</table>
712
713### getMedia<a name="en-us_topic_0000001150318493_section6710152513409"></a>
714
715Obtains the content of the media file corresponding to a specified resource ID in callback mode.
716
717**Parameters**
718
719<a name="en-us_topic_0000001150318493_table13710192554016"></a>
720<table><thead align="left"><tr id="en-us_topic_0000001150318493_row3710152534017"><th class="cellrowborder" valign="top" width="7.901402961808262%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001150318493_p47108259406"><a name="en-us_topic_0000001150318493_p47108259406"></a><a name="en-us_topic_0000001150318493_p47108259406"></a>Name</p>
721</th>
722<th class="cellrowborder" valign="top" width="25.565081839438818%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001150318493_p2710102564013"><a name="en-us_topic_0000001150318493_p2710102564013"></a><a name="en-us_topic_0000001150318493_p2710102564013"></a>Type</p>
723</th>
724<th class="cellrowborder" valign="top" width="6.819953234606392%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001150318493_p17710525154014"><a name="en-us_topic_0000001150318493_p17710525154014"></a><a name="en-us_topic_0000001150318493_p17710525154014"></a>Mandatory</p>
725</th>
726<th class="cellrowborder" valign="top" width="59.713561964146535%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001150318493_p771022517402"><a name="en-us_topic_0000001150318493_p771022517402"></a><a name="en-us_topic_0000001150318493_p771022517402"></a>Description</p>
727</th>
728</tr>
729</thead>
730<tbody><tr id="en-us_topic_0000001150318493_row871062544010"><td class="cellrowborder" valign="top" width="7.901402961808262%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p1871016257407"><a name="en-us_topic_0000001150318493_p1871016257407"></a><a name="en-us_topic_0000001150318493_p1871016257407"></a>resId</p>
731</td>
732<td class="cellrowborder" valign="top" width="25.565081839438818%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p1371002534015"><a name="en-us_topic_0000001150318493_p1371002534015"></a><a name="en-us_topic_0000001150318493_p1371002534015"></a>number</p>
733</td>
734<td class="cellrowborder" valign="top" width="6.819953234606392%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p16711122515403"><a name="en-us_topic_0000001150318493_p16711122515403"></a><a name="en-us_topic_0000001150318493_p16711122515403"></a>Yes</p>
735</td>
736<td class="cellrowborder" valign="top" width="59.713561964146535%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p1271119257400"><a name="en-us_topic_0000001150318493_p1271119257400"></a><a name="en-us_topic_0000001150318493_p1271119257400"></a>Indicates the resource ID.</p>
737</td>
738</tr>
739<tr id="en-us_topic_0000001150318493_row1971112524019"><td class="cellrowborder" valign="top" width="7.901402961808262%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p27111125204017"><a name="en-us_topic_0000001150318493_p27111125204017"></a><a name="en-us_topic_0000001150318493_p27111125204017"></a>callback</p>
740</td>
741<td class="cellrowborder" valign="top" width="25.565081839438818%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p1371152514409"><a name="en-us_topic_0000001150318493_p1371152514409"></a><a name="en-us_topic_0000001150318493_p1371152514409"></a><a href="#en-us_topic_0000001150318493_section256244135613">AsyncCallback</a>&lt;Array&lt;Uint8Array&gt;&gt;</p>
742</td>
743<td class="cellrowborder" valign="top" width="6.819953234606392%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p13711625124019"><a name="en-us_topic_0000001150318493_p13711625124019"></a><a name="en-us_topic_0000001150318493_p13711625124019"></a>Yes</p>
744</td>
745<td class="cellrowborder" valign="top" width="59.713561964146535%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p8711172511406"><a name="en-us_topic_0000001150318493_p8711172511406"></a><a name="en-us_topic_0000001150318493_p8711172511406"></a>Indicates the asynchronous callback used to return the obtained media file content.</p>
746</td>
747</tr>
748</tbody>
749</table>
750
751**Return Values**
752
753None.
754
755### getMedia<a name="en-us_topic_0000001150318493_section6711152517409"></a>
756
757Obtains the content of the media file corresponding to a specified resource ID in Promise mode.
758
759**Parameters**
760
761<a name="en-us_topic_0000001150318493_table10711725154015"></a>
762<table><thead align="left"><tr id="en-us_topic_0000001150318493_row8712225154016"><th class="cellrowborder" valign="top" width="14.82%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001150318493_p371210253407"><a name="en-us_topic_0000001150318493_p371210253407"></a><a name="en-us_topic_0000001150318493_p371210253407"></a>Name</p>
763</th>
764<th class="cellrowborder" valign="top" width="14.729999999999999%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001150318493_p771214253404"><a name="en-us_topic_0000001150318493_p771214253404"></a><a name="en-us_topic_0000001150318493_p771214253404"></a>Type</p>
765</th>
766<th class="cellrowborder" valign="top" width="9.16%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001150318493_p171242574017"><a name="en-us_topic_0000001150318493_p171242574017"></a><a name="en-us_topic_0000001150318493_p171242574017"></a>Mandatory</p>
767</th>
768<th class="cellrowborder" valign="top" width="61.29%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001150318493_p6712725114013"><a name="en-us_topic_0000001150318493_p6712725114013"></a><a name="en-us_topic_0000001150318493_p6712725114013"></a>Description</p>
769</th>
770</tr>
771</thead>
772<tbody><tr id="en-us_topic_0000001150318493_row971232544013"><td class="cellrowborder" valign="top" width="14.82%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p67126252406"><a name="en-us_topic_0000001150318493_p67126252406"></a><a name="en-us_topic_0000001150318493_p67126252406"></a>resId</p>
773</td>
774<td class="cellrowborder" valign="top" width="14.729999999999999%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p12712425114012"><a name="en-us_topic_0000001150318493_p12712425114012"></a><a name="en-us_topic_0000001150318493_p12712425114012"></a>number</p>
775</td>
776<td class="cellrowborder" valign="top" width="9.16%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p19712152511403"><a name="en-us_topic_0000001150318493_p19712152511403"></a><a name="en-us_topic_0000001150318493_p19712152511403"></a>Yes</p>
777</td>
778<td class="cellrowborder" valign="top" width="61.29%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p8712162564019"><a name="en-us_topic_0000001150318493_p8712162564019"></a><a name="en-us_topic_0000001150318493_p8712162564019"></a>Indicates the resource ID.</p>
779</td>
780</tr>
781</tbody>
782</table>
783
784**Return Values**
785
786<a name="en-us_topic_0000001150318493_table271292534018"></a>
787<table><thead align="left"><tr id="en-us_topic_0000001150318493_row1971352524020"><th class="cellrowborder" valign="top" width="23.02%" id="mcps1.1.3.1.1"><p id="en-us_topic_0000001150318493_p9713925104011"><a name="en-us_topic_0000001150318493_p9713925104011"></a><a name="en-us_topic_0000001150318493_p9713925104011"></a>Type</p>
788</th>
789<th class="cellrowborder" valign="top" width="76.98%" id="mcps1.1.3.1.2"><p id="en-us_topic_0000001150318493_p471352574010"><a name="en-us_topic_0000001150318493_p471352574010"></a><a name="en-us_topic_0000001150318493_p471352574010"></a>Description</p>
790</th>
791</tr>
792</thead>
793<tbody><tr id="en-us_topic_0000001150318493_row9713142554012"><td class="cellrowborder" valign="top" width="23.02%" headers="mcps1.1.3.1.1 "><p id="en-us_topic_0000001150318493_p1071352554019"><a name="en-us_topic_0000001150318493_p1071352554019"></a><a name="en-us_topic_0000001150318493_p1071352554019"></a>Promise&lt;Array&lt;Uint8Array&gt;&gt;</p>
794</td>
795<td class="cellrowborder" valign="top" width="76.98%" headers="mcps1.1.3.1.2 "><p id="en-us_topic_0000001150318493_p8713192517405"><a name="en-us_topic_0000001150318493_p8713192517405"></a><a name="en-us_topic_0000001150318493_p8713192517405"></a>Indicates the content of the media file corresponding to the specified resource ID.</p>
796</td>
797</tr>
798</tbody>
799</table>
800
801### getMediaBase64<a name="en-us_topic_0000001150318493_section11402326194315"></a>
802
803Obtains the Base64 code of the image resource corresponding to the specified resource ID in callback mode.
804
805**Parameters**
806
807<a name="en-us_topic_0000001150318493_table1740272614430"></a>
808<table><thead align="left"><tr id="en-us_topic_0000001150318493_row540272684311"><th class="cellrowborder" valign="top" width="7.901402961808262%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001150318493_p1340272624311"><a name="en-us_topic_0000001150318493_p1340272624311"></a><a name="en-us_topic_0000001150318493_p1340272624311"></a>Name</p>
809</th>
810<th class="cellrowborder" valign="top" width="25.565081839438818%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001150318493_p8402192617438"><a name="en-us_topic_0000001150318493_p8402192617438"></a><a name="en-us_topic_0000001150318493_p8402192617438"></a>Type</p>
811</th>
812<th class="cellrowborder" valign="top" width="6.819953234606392%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001150318493_p1440222674312"><a name="en-us_topic_0000001150318493_p1440222674312"></a><a name="en-us_topic_0000001150318493_p1440222674312"></a>Mandatory</p>
813</th>
814<th class="cellrowborder" valign="top" width="59.713561964146535%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001150318493_p11403926164312"><a name="en-us_topic_0000001150318493_p11403926164312"></a><a name="en-us_topic_0000001150318493_p11403926164312"></a>Description</p>
815</th>
816</tr>
817</thead>
818<tbody><tr id="en-us_topic_0000001150318493_row54031726114310"><td class="cellrowborder" valign="top" width="7.901402961808262%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p114031326154312"><a name="en-us_topic_0000001150318493_p114031326154312"></a><a name="en-us_topic_0000001150318493_p114031326154312"></a>resId</p>
819</td>
820<td class="cellrowborder" valign="top" width="25.565081839438818%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p1040382604313"><a name="en-us_topic_0000001150318493_p1040382604313"></a><a name="en-us_topic_0000001150318493_p1040382604313"></a>number</p>
821</td>
822<td class="cellrowborder" valign="top" width="6.819953234606392%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p94035265431"><a name="en-us_topic_0000001150318493_p94035265431"></a><a name="en-us_topic_0000001150318493_p94035265431"></a>Yes</p>
823</td>
824<td class="cellrowborder" valign="top" width="59.713561964146535%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p1140392612434"><a name="en-us_topic_0000001150318493_p1140392612434"></a><a name="en-us_topic_0000001150318493_p1140392612434"></a>Indicates the resource ID.</p>
825</td>
826</tr>
827<tr id="en-us_topic_0000001150318493_row12403192615432"><td class="cellrowborder" valign="top" width="7.901402961808262%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p14031226144319"><a name="en-us_topic_0000001150318493_p14031226144319"></a><a name="en-us_topic_0000001150318493_p14031226144319"></a>callback</p>
828</td>
829<td class="cellrowborder" valign="top" width="25.565081839438818%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p1740382618433"><a name="en-us_topic_0000001150318493_p1740382618433"></a><a name="en-us_topic_0000001150318493_p1740382618433"></a><a href="#en-us_topic_0000001150318493_section256244135613">AsyncCallback</a>&lt;string&gt;</p>
830</td>
831<td class="cellrowborder" valign="top" width="6.819953234606392%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p144032026104313"><a name="en-us_topic_0000001150318493_p144032026104313"></a><a name="en-us_topic_0000001150318493_p144032026104313"></a>Yes</p>
832</td>
833<td class="cellrowborder" valign="top" width="59.713561964146535%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p18403142618437"><a name="en-us_topic_0000001150318493_p18403142618437"></a><a name="en-us_topic_0000001150318493_p18403142618437"></a>Indicates the asynchronous callback used to return the obtained Base64 code of the image resource.</p>
834</td>
835</tr>
836</tbody>
837</table>
838
839**Return Values**
840
841None.
842
843### getMediaBase64<a name="en-us_topic_0000001150318493_section6404726124312"></a>
844
845Obtains the Base64 code of the image resource corresponding to the specified resource ID in Promise mode.
846
847**Parameters**
848
849<a name="en-us_topic_0000001150318493_table1840452674318"></a>
850<table><thead align="left"><tr id="en-us_topic_0000001150318493_row84041226184317"><th class="cellrowborder" valign="top" width="14.82%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001150318493_p5404926154316"><a name="en-us_topic_0000001150318493_p5404926154316"></a><a name="en-us_topic_0000001150318493_p5404926154316"></a>Name</p>
851</th>
852<th class="cellrowborder" valign="top" width="14.729999999999999%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001150318493_p194048268435"><a name="en-us_topic_0000001150318493_p194048268435"></a><a name="en-us_topic_0000001150318493_p194048268435"></a>Type</p>
853</th>
854<th class="cellrowborder" valign="top" width="9.16%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001150318493_p184041226104320"><a name="en-us_topic_0000001150318493_p184041226104320"></a><a name="en-us_topic_0000001150318493_p184041226104320"></a>Mandatory</p>
855</th>
856<th class="cellrowborder" valign="top" width="61.29%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001150318493_p12404726184315"><a name="en-us_topic_0000001150318493_p12404726184315"></a><a name="en-us_topic_0000001150318493_p12404726184315"></a>Description</p>
857</th>
858</tr>
859</thead>
860<tbody><tr id="en-us_topic_0000001150318493_row8404126124314"><td class="cellrowborder" valign="top" width="14.82%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p104051426104313"><a name="en-us_topic_0000001150318493_p104051426104313"></a><a name="en-us_topic_0000001150318493_p104051426104313"></a>resId</p>
861</td>
862<td class="cellrowborder" valign="top" width="14.729999999999999%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p15405172610430"><a name="en-us_topic_0000001150318493_p15405172610430"></a><a name="en-us_topic_0000001150318493_p15405172610430"></a>number</p>
863</td>
864<td class="cellrowborder" valign="top" width="9.16%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p240582616430"><a name="en-us_topic_0000001150318493_p240582616430"></a><a name="en-us_topic_0000001150318493_p240582616430"></a>Yes</p>
865</td>
866<td class="cellrowborder" valign="top" width="61.29%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p124051726104318"><a name="en-us_topic_0000001150318493_p124051726104318"></a><a name="en-us_topic_0000001150318493_p124051726104318"></a>Indicates the resource ID.</p>
867</td>
868</tr>
869</tbody>
870</table>
871
872**Return Values**
873
874<a name="en-us_topic_0000001150318493_table1240514269437"></a>
875<table><thead align="left"><tr id="en-us_topic_0000001150318493_row1240532620433"><th class="cellrowborder" valign="top" width="23.02%" id="mcps1.1.3.1.1"><p id="en-us_topic_0000001150318493_p1406202614313"><a name="en-us_topic_0000001150318493_p1406202614313"></a><a name="en-us_topic_0000001150318493_p1406202614313"></a>Type</p>
876</th>
877<th class="cellrowborder" valign="top" width="76.98%" id="mcps1.1.3.1.2"><p id="en-us_topic_0000001150318493_p8406226124316"><a name="en-us_topic_0000001150318493_p8406226124316"></a><a name="en-us_topic_0000001150318493_p8406226124316"></a>Description</p>
878</th>
879</tr>
880</thead>
881<tbody><tr id="en-us_topic_0000001150318493_row164065261435"><td class="cellrowborder" valign="top" width="23.02%" headers="mcps1.1.3.1.1 "><p id="en-us_topic_0000001150318493_p5406182612436"><a name="en-us_topic_0000001150318493_p5406182612436"></a><a name="en-us_topic_0000001150318493_p5406182612436"></a>Promise&lt;string&gt;</p>
882</td>
883<td class="cellrowborder" valign="top" width="76.98%" headers="mcps1.1.3.1.2 "><p id="en-us_topic_0000001150318493_p3406182612434"><a name="en-us_topic_0000001150318493_p3406182612434"></a><a name="en-us_topic_0000001150318493_p3406182612434"></a>Indicates the Base64 code of the image resource corresponding to the specified resource ID.</p>
884</td>
885</tr>
886</tbody>
887</table>
888
889### getConfiguration<a name="en-us_topic_0000001150318493_section8123152874015"></a>
890
891Obtains the device configuration in callback mode.
892
893**Parameters**
894
895<a name="en-us_topic_0000001150318493_table15123112811401"></a>
896<table><thead align="left"><tr id="en-us_topic_0000001150318493_row13123102844013"><th class="cellrowborder" valign="top" width="8.110000000000001%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001150318493_p1812311285406"><a name="en-us_topic_0000001150318493_p1812311285406"></a><a name="en-us_topic_0000001150318493_p1812311285406"></a>Name</p>
897</th>
898<th class="cellrowborder" valign="top" width="21.44%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001150318493_p101239284409"><a name="en-us_topic_0000001150318493_p101239284409"></a><a name="en-us_topic_0000001150318493_p101239284409"></a>Type</p>
899</th>
900<th class="cellrowborder" valign="top" width="9.16%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001150318493_p41236289403"><a name="en-us_topic_0000001150318493_p41236289403"></a><a name="en-us_topic_0000001150318493_p41236289403"></a>Mandatory</p>
901</th>
902<th class="cellrowborder" valign="top" width="61.29%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001150318493_p201231228164019"><a name="en-us_topic_0000001150318493_p201231228164019"></a><a name="en-us_topic_0000001150318493_p201231228164019"></a>Description</p>
903</th>
904</tr>
905</thead>
906<tbody><tr id="en-us_topic_0000001150318493_row141241285400"><td class="cellrowborder" valign="top" width="8.110000000000001%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p812452814012"><a name="en-us_topic_0000001150318493_p812452814012"></a><a name="en-us_topic_0000001150318493_p812452814012"></a>callback</p>
907</td>
908<td class="cellrowborder" valign="top" width="21.44%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p1412420284405"><a name="en-us_topic_0000001150318493_p1412420284405"></a><a name="en-us_topic_0000001150318493_p1412420284405"></a><a href="#en-us_topic_0000001150318493_section256244135613">AsyncCallback</a>&lt;<a href="#en-us_topic_0000001150318493_section12882825611">Configuration</a>&gt;</p>
909</td>
910<td class="cellrowborder" valign="top" width="9.16%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p10124122817403"><a name="en-us_topic_0000001150318493_p10124122817403"></a><a name="en-us_topic_0000001150318493_p10124122817403"></a>Yes</p>
911</td>
912<td class="cellrowborder" valign="top" width="61.29%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p161241028184011"><a name="en-us_topic_0000001150318493_p161241028184011"></a><a name="en-us_topic_0000001150318493_p161241028184011"></a>Indicates the asynchronous callback used to return the obtained device configuration.</p>
913</td>
914</tr>
915</tbody>
916</table>
917
918**Return Values**
919
920None.
921
922### getConfiguration<a name="en-us_topic_0000001150318493_section312515284406"></a>
923
924Obtains the device configuration in Promise mode.
925
926**Parameters**
927
928None.
929
930**Return Values**
931
932<a name="en-us_topic_0000001150318493_table12126228134013"></a>
933<table><thead align="left"><tr id="en-us_topic_0000001150318493_row11126728184016"><th class="cellrowborder" valign="top" width="20.05%" id="mcps1.1.3.1.1"><p id="en-us_topic_0000001150318493_p191261028174019"><a name="en-us_topic_0000001150318493_p191261028174019"></a><a name="en-us_topic_0000001150318493_p191261028174019"></a>Type</p>
934</th>
935<th class="cellrowborder" valign="top" width="79.95%" id="mcps1.1.3.1.2"><p id="en-us_topic_0000001150318493_p6126202894018"><a name="en-us_topic_0000001150318493_p6126202894018"></a><a name="en-us_topic_0000001150318493_p6126202894018"></a>Description</p>
936</th>
937</tr>
938</thead>
939<tbody><tr id="en-us_topic_0000001150318493_row8126728174017"><td class="cellrowborder" valign="top" width="20.05%" headers="mcps1.1.3.1.1 "><p id="en-us_topic_0000001150318493_p112718283409"><a name="en-us_topic_0000001150318493_p112718283409"></a><a name="en-us_topic_0000001150318493_p112718283409"></a>Promise&lt;<a href="#en-us_topic_0000001150318493_section12882825611">Configuration</a>&gt;</p>
940</td>
941<td class="cellrowborder" valign="top" width="79.95%" headers="mcps1.1.3.1.2 "><p id="en-us_topic_0000001150318493_p1412792864011"><a name="en-us_topic_0000001150318493_p1412792864011"></a><a name="en-us_topic_0000001150318493_p1412792864011"></a>Indicates the device configuration.</p>
942</td>
943</tr>
944</tbody>
945</table>
946
947### getDeviceCapability<a name="en-us_topic_0000001150318493_section104951210135017"></a>
948
949Obtains the device capability in callback mode.
950
951**Parameters**
952
953<a name="en-us_topic_0000001150318493_table1495410115014"></a>
954<table><thead align="left"><tr id="en-us_topic_0000001150318493_row649514108507"><th class="cellrowborder" valign="top" width="8.110000000000001%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001150318493_p54957102501"><a name="en-us_topic_0000001150318493_p54957102501"></a><a name="en-us_topic_0000001150318493_p54957102501"></a>Name</p>
955</th>
956<th class="cellrowborder" valign="top" width="25.28%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001150318493_p649531011504"><a name="en-us_topic_0000001150318493_p649531011504"></a><a name="en-us_topic_0000001150318493_p649531011504"></a>Type</p>
957</th>
958<th class="cellrowborder" valign="top" width="5.319999999999999%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001150318493_p74954109501"><a name="en-us_topic_0000001150318493_p74954109501"></a><a name="en-us_topic_0000001150318493_p74954109501"></a>Mandatory</p>
959</th>
960<th class="cellrowborder" valign="top" width="61.29%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001150318493_p174951910155019"><a name="en-us_topic_0000001150318493_p174951910155019"></a><a name="en-us_topic_0000001150318493_p174951910155019"></a>Description</p>
961</th>
962</tr>
963</thead>
964<tbody><tr id="en-us_topic_0000001150318493_row11495710115015"><td class="cellrowborder" valign="top" width="8.110000000000001%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p154951510185014"><a name="en-us_topic_0000001150318493_p154951510185014"></a><a name="en-us_topic_0000001150318493_p154951510185014"></a>callback</p>
965</td>
966<td class="cellrowborder" valign="top" width="25.28%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p174955105509"><a name="en-us_topic_0000001150318493_p174955105509"></a><a name="en-us_topic_0000001150318493_p174955105509"></a><a href="#en-us_topic_0000001150318493_section256244135613">AsyncCallback</a>&lt;<a href="#en-us_topic_0000001150318493_section7200123494410">DeviceCapability</a>&gt;</p>
967</td>
968<td class="cellrowborder" valign="top" width="5.319999999999999%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p1495121012501"><a name="en-us_topic_0000001150318493_p1495121012501"></a><a name="en-us_topic_0000001150318493_p1495121012501"></a>Yes</p>
969</td>
970<td class="cellrowborder" valign="top" width="61.29%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p54969103507"><a name="en-us_topic_0000001150318493_p54969103507"></a><a name="en-us_topic_0000001150318493_p54969103507"></a>Indicates the asynchronous callback used to return the obtained device capability.</p>
971</td>
972</tr>
973</tbody>
974</table>
975
976**Return Values**
977
978None.
979
980### getDeviceCapability<a name="en-us_topic_0000001150318493_section114961410115013"></a>
981
982Obtains the device capability in Promise mode.
983
984**Parameters**
985
986None.
987
988**Return Values**
989
990<a name="en-us_topic_0000001150318493_table17496111015019"></a>
991<table><thead align="left"><tr id="en-us_topic_0000001150318493_row12496111095010"><th class="cellrowborder" valign="top" width="20.05%" id="mcps1.1.3.1.1"><p id="en-us_topic_0000001150318493_p1496101015503"><a name="en-us_topic_0000001150318493_p1496101015503"></a><a name="en-us_topic_0000001150318493_p1496101015503"></a>Type</p>
992</th>
993<th class="cellrowborder" valign="top" width="79.95%" id="mcps1.1.3.1.2"><p id="en-us_topic_0000001150318493_p1496110155013"><a name="en-us_topic_0000001150318493_p1496110155013"></a><a name="en-us_topic_0000001150318493_p1496110155013"></a>Description</p>
994</th>
995</tr>
996</thead>
997<tbody><tr id="en-us_topic_0000001150318493_row10496181065014"><td class="cellrowborder" valign="top" width="20.05%" headers="mcps1.1.3.1.1 "><p id="en-us_topic_0000001150318493_p19497151095012"><a name="en-us_topic_0000001150318493_p19497151095012"></a><a name="en-us_topic_0000001150318493_p19497151095012"></a>Promise&lt;<a href="#en-us_topic_0000001150318493_section7200123494410">DeviceCapability</a>&gt;</p>
998</td>
999<td class="cellrowborder" valign="top" width="79.95%" headers="mcps1.1.3.1.2 "><p id="en-us_topic_0000001150318493_p18497141011504"><a name="en-us_topic_0000001150318493_p18497141011504"></a><a name="en-us_topic_0000001150318493_p18497141011504"></a>Indicates the device capability.</p>
1000</td>
1001</tr>
1002</tbody>
1003</table>
1004
1005**Return Values**
1006
1007None.
1008
1009### getPluralString<a name="en-us_topic_0000001150318493_section1549163064013"></a>
1010
1011Obtains the singular-plural character string represented by the ID string corresponding to the specified number in callback mode.
1012
1013**Parameters**
1014
1015<a name="en-us_topic_0000001150318493_table649330164020"></a>
1016<table><thead align="left"><tr id="en-us_topic_0000001150318493_row6491302400"><th class="cellrowborder" valign="top" width="8.110000000000001%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001150318493_p1749123034017"><a name="en-us_topic_0000001150318493_p1749123034017"></a><a name="en-us_topic_0000001150318493_p1749123034017"></a>Name</p>
1017</th>
1018<th class="cellrowborder" valign="top" width="21.44%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001150318493_p449143064012"><a name="en-us_topic_0000001150318493_p449143064012"></a><a name="en-us_topic_0000001150318493_p449143064012"></a>Type</p>
1019</th>
1020<th class="cellrowborder" valign="top" width="9.16%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001150318493_p1349123044017"><a name="en-us_topic_0000001150318493_p1349123044017"></a><a name="en-us_topic_0000001150318493_p1349123044017"></a>Mandatory</p>
1021</th>
1022<th class="cellrowborder" valign="top" width="61.29%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001150318493_p11491302408"><a name="en-us_topic_0000001150318493_p11491302408"></a><a name="en-us_topic_0000001150318493_p11491302408"></a>Description</p>
1023</th>
1024</tr>
1025</thead>
1026<tbody><tr id="en-us_topic_0000001150318493_row145013054010"><td class="cellrowborder" valign="top" width="8.110000000000001%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p65073012401"><a name="en-us_topic_0000001150318493_p65073012401"></a><a name="en-us_topic_0000001150318493_p65073012401"></a>resId</p>
1027</td>
1028<td class="cellrowborder" valign="top" width="21.44%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p11502030124016"><a name="en-us_topic_0000001150318493_p11502030124016"></a><a name="en-us_topic_0000001150318493_p11502030124016"></a>number</p>
1029</td>
1030<td class="cellrowborder" valign="top" width="9.16%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p1650330174019"><a name="en-us_topic_0000001150318493_p1650330174019"></a><a name="en-us_topic_0000001150318493_p1650330174019"></a>Yes</p>
1031</td>
1032<td class="cellrowborder" valign="top" width="61.29%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p1650163034013"><a name="en-us_topic_0000001150318493_p1650163034013"></a><a name="en-us_topic_0000001150318493_p1650163034013"></a>Indicates the resource ID.</p>
1033</td>
1034</tr>
1035<tr id="en-us_topic_0000001150318493_row18497201611531"><td class="cellrowborder" valign="top" width="8.110000000000001%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p1949711615318"><a name="en-us_topic_0000001150318493_p1949711615318"></a><a name="en-us_topic_0000001150318493_p1949711615318"></a>num:</p>
1036</td>
1037<td class="cellrowborder" valign="top" width="21.44%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p13497191615532"><a name="en-us_topic_0000001150318493_p13497191615532"></a><a name="en-us_topic_0000001150318493_p13497191615532"></a>number</p>
1038</td>
1039<td class="cellrowborder" valign="top" width="9.16%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p9497716125311"><a name="en-us_topic_0000001150318493_p9497716125311"></a><a name="en-us_topic_0000001150318493_p9497716125311"></a>Yes</p>
1040</td>
1041<td class="cellrowborder" valign="top" width="61.29%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p249771619536"><a name="en-us_topic_0000001150318493_p249771619536"></a><a name="en-us_topic_0000001150318493_p249771619536"></a>Indicates the number.</p>
1042</td>
1043</tr>
1044<tr id="en-us_topic_0000001150318493_row45053011403"><td class="cellrowborder" valign="top" width="8.110000000000001%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p1650230204016"><a name="en-us_topic_0000001150318493_p1650230204016"></a><a name="en-us_topic_0000001150318493_p1650230204016"></a>callback</p>
1045</td>
1046<td class="cellrowborder" valign="top" width="21.44%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p165010302401"><a name="en-us_topic_0000001150318493_p165010302401"></a><a name="en-us_topic_0000001150318493_p165010302401"></a><a href="#en-us_topic_0000001150318493_section256244135613">AsyncCallback</a>&lt;string&gt;</p>
1047</td>
1048<td class="cellrowborder" valign="top" width="9.16%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p7501530164018"><a name="en-us_topic_0000001150318493_p7501530164018"></a><a name="en-us_topic_0000001150318493_p7501530164018"></a>Yes</p>
1049</td>
1050<td class="cellrowborder" valign="top" width="61.29%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p17501330104012"><a name="en-us_topic_0000001150318493_p17501330104012"></a><a name="en-us_topic_0000001150318493_p17501330104012"></a>Indicates the asynchronous callback used to return the singular-plural character string represented by the ID string corresponding to the specified number.</p>
1051</td>
1052</tr>
1053</tbody>
1054</table>
1055
1056**Return Values**
1057
1058None.
1059
1060### getPluralString<a name="en-us_topic_0000001150318493_section165183015405"></a>
1061
1062Obtains the singular-plural character string represented by the ID string corresponding to the specified number in Promise mode.
1063
1064**Parameters**
1065
1066<a name="en-us_topic_0000001150318493_table105173016408"></a>
1067<table><thead align="left"><tr id="en-us_topic_0000001150318493_row195223064018"><th class="cellrowborder" valign="top" width="14.82%" id="mcps1.1.5.1.1"><p id="en-us_topic_0000001150318493_p1752183064013"><a name="en-us_topic_0000001150318493_p1752183064013"></a><a name="en-us_topic_0000001150318493_p1752183064013"></a>Name</p>
1068</th>
1069<th class="cellrowborder" valign="top" width="14.729999999999999%" id="mcps1.1.5.1.2"><p id="en-us_topic_0000001150318493_p175273064016"><a name="en-us_topic_0000001150318493_p175273064016"></a><a name="en-us_topic_0000001150318493_p175273064016"></a>Type</p>
1070</th>
1071<th class="cellrowborder" valign="top" width="9.16%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001150318493_p1452430124014"><a name="en-us_topic_0000001150318493_p1452430124014"></a><a name="en-us_topic_0000001150318493_p1452430124014"></a>Mandatory</p>
1072</th>
1073<th class="cellrowborder" valign="top" width="61.29%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001150318493_p9525305406"><a name="en-us_topic_0000001150318493_p9525305406"></a><a name="en-us_topic_0000001150318493_p9525305406"></a>Description</p>
1074</th>
1075</tr>
1076</thead>
1077<tbody><tr id="en-us_topic_0000001150318493_row65233019409"><td class="cellrowborder" valign="top" width="14.82%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p125213301405"><a name="en-us_topic_0000001150318493_p125213301405"></a><a name="en-us_topic_0000001150318493_p125213301405"></a>resId</p>
1078</td>
1079<td class="cellrowborder" valign="top" width="14.729999999999999%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p55293019409"><a name="en-us_topic_0000001150318493_p55293019409"></a><a name="en-us_topic_0000001150318493_p55293019409"></a>number</p>
1080</td>
1081<td class="cellrowborder" valign="top" width="9.16%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p553103094019"><a name="en-us_topic_0000001150318493_p553103094019"></a><a name="en-us_topic_0000001150318493_p553103094019"></a>Yes</p>
1082</td>
1083<td class="cellrowborder" valign="top" width="61.29%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p1453430124015"><a name="en-us_topic_0000001150318493_p1453430124015"></a><a name="en-us_topic_0000001150318493_p1453430124015"></a>Indicates the resource ID.</p>
1084</td>
1085</tr>
1086<tr id="en-us_topic_0000001150318493_row05323013406"><td class="cellrowborder" valign="top" width="14.82%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001150318493_p197652617548"><a name="en-us_topic_0000001150318493_p197652617548"></a><a name="en-us_topic_0000001150318493_p197652617548"></a>num:</p>
1087</td>
1088<td class="cellrowborder" valign="top" width="14.729999999999999%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001150318493_p187651685411"><a name="en-us_topic_0000001150318493_p187651685411"></a><a name="en-us_topic_0000001150318493_p187651685411"></a>number</p>
1089</td>
1090<td class="cellrowborder" valign="top" width="9.16%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001150318493_p776517611543"><a name="en-us_topic_0000001150318493_p776517611543"></a><a name="en-us_topic_0000001150318493_p776517611543"></a>Yes</p>
1091</td>
1092<td class="cellrowborder" valign="top" width="61.29%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001150318493_p2076646145413"><a name="en-us_topic_0000001150318493_p2076646145413"></a><a name="en-us_topic_0000001150318493_p2076646145413"></a>Indicates the number.</p>
1093</td>
1094</tr>
1095</tbody>
1096</table>
1097
1098**Return Values**
1099
1100<a name="en-us_topic_0000001150318493_table45313011403"></a>
1101<table><thead align="left"><tr id="en-us_topic_0000001150318493_row554133016401"><th class="cellrowborder" valign="top" width="20.05%" id="mcps1.1.3.1.1"><p id="en-us_topic_0000001150318493_p13549300401"><a name="en-us_topic_0000001150318493_p13549300401"></a><a name="en-us_topic_0000001150318493_p13549300401"></a>Type</p>
1102</th>
1103<th class="cellrowborder" valign="top" width="79.95%" id="mcps1.1.3.1.2"><p id="en-us_topic_0000001150318493_p75419307408"><a name="en-us_topic_0000001150318493_p75419307408"></a><a name="en-us_topic_0000001150318493_p75419307408"></a>Description</p>
1104</th>
1105</tr>
1106</thead>
1107<tbody><tr id="en-us_topic_0000001150318493_row1554143094015"><td class="cellrowborder" valign="top" width="20.05%" headers="mcps1.1.3.1.1 "><p id="en-us_topic_0000001150318493_p115483064019"><a name="en-us_topic_0000001150318493_p115483064019"></a><a name="en-us_topic_0000001150318493_p115483064019"></a>Promise&lt;string&gt;</p>
1108</td>
1109<td class="cellrowborder" valign="top" width="79.95%" headers="mcps1.1.3.1.2 "><p id="en-us_topic_0000001150318493_p1965948111118"><a name="en-us_topic_0000001150318493_p1965948111118"></a><a name="en-us_topic_0000001150318493_p1965948111118"></a>Indicates the singular-plural character string represented by the ID string corresponding to the specified number.</p>
1110</td>
1111</tr>
1112</tbody>
1113</table>
1114
1115