> The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import<a name="s56d19203690d4782bfc74069abb6bd71"></a>
## Modules to Import
```
import resourceManager from '@ohos.resourceManager';
<td class="cellrowborder" valign="top" width="59.211670370012556%" headers="mcps1.1.5.1.4 "><p id="p569972818014"><a name="p569972818014"></a><a name="p569972818014"></a>Bundle name of the specified application.</p>
<td class="cellrowborder" valign="top" width="61.29%" headers="mcps1.1.5.1.4 "><p id="p1446633701612"><a name="p1446633701612"></a><a name="p1446633701612"></a>Bundle name of the specified application.</p>
<tdclass="cellrowborder"valign="top"width="59.68%"headers="mcps1.1.4.1.3 "><pid="p1133133881918"><aname="p1133133881918"></a><aname="p1133133881918"></a>Screen density with small-scale dots per inch (SDPI).</p>
<tdclass="cellrowborder"valign="top"width="59.68%"headers="mcps1.1.4.1.3 "><pid="p139921534173016"><aname="p139921534173016"></a><aname="p139921534173016"></a>Screen density with medium-scale dots per inch (MDPI)</p>
<tdclass="cellrowborder"valign="top"width="59.68%"headers="mcps1.1.4.1.3 "><pid="p1084116309304"><aname="p1084116309304"></a><aname="p1084116309304"></a>Screen density with large-scale dots per inch (LDPI).</p>
<tdclass="cellrowborder"valign="top"width="59.68%"headers="mcps1.1.4.1.3 "><pid="p084110301309"><aname="p084110301309"></a><aname="p084110301309"></a>Screen density with extra-large-scale dots per inch (XLDPI).</p>
<tdclass="cellrowborder"valign="top"width="59.68%"headers="mcps1.1.4.1.3 "><pid="p6841226163015"><aname="p6841226163015"></a><aname="p6841226163015"></a>Screen density with extra-extra-large-scale dots per inch (XXLDPI).</p>
<tdclass="cellrowborder"valign="top"width="59.68%"headers="mcps1.1.4.1.3 "><pid="p199356496257"><aname="p199356496257"></a><aname="p199356496257"></a>Screen density with extra-extra-extra-large-scale dots per inch (XXXLDPI).</p>
<tdclass="cellrowborder"valign="top"width="52.42%"headers="mcps1.1.6.1.5 "><pid="p2059719436313"><aname="p2059719436313"></a><aname="p2059719436313"></a>Screen direction of the current device.</p>
<tdclass="cellrowborder"valign="top"width="52.42%"headers="mcps1.1.6.1.5 "><pid="p10597843034"><aname="p10597843034"></a><aname="p10597843034"></a>Current system language.</p>
<tdclass="cellrowborder"valign="top"width="52.42%"headers="mcps1.1.6.1.5 "><pid="p202021934134412"><aname="p202021934134412"></a><aname="p202021934134412"></a>Screen density of the current device.</p>
<tdclass="cellrowborder"valign="top"width="52.42%"headers="mcps1.1.6.1.5 "><pid="p112021341446"><aname="p112021341446"></a><aname="p112021341446"></a>Type of the current device.</p>
>- The methods involved in **ResourceManager** are applicable only to the TypeScript-based declarative development paradigm.
>- Resource files are defined in the **resources** directory of the project. You can obtain the resource ID from **$r\(resource address\).id**, for example, **$r\(?app.string.test?\).id**.
| SCREEN_SDPI | 120 | Screen density with small-scale dots per inch (SDPI).<br>**System capability**: SystemCapability.Global.ResourceManager|
| SCREEN_MDPI | 160 | Screen density with medium-scale dots per inch (MDPI).<br>**System capability**: SystemCapability.Global.ResourceManager|
| SCREEN_LDPI | 240 | Screen density with large-scale dots per inch (LDPI).<br>**System capability**: SystemCapability.Global.ResourceManager|
| SCREEN_XLDPI | 320 | Screen density with extra-large-scale dots per inch (XLDPI).<br>**System capability**: SystemCapability.Global.ResourceManager|
| SCREEN_XXLDPI | 480 | Screen density with extra-extra-large-scale dots per inch (XXLDPI).<br>**System capability**: SystemCapability.Global.ResourceManager|
| SCREEN_XXXLDPI | 640 | Screen density with extra-extra-extra-large-scale dots per inch (XXXLDPI).<br>**System capability**: SystemCapability.Global.ResourceManager|
| screenDensity | [ScreenDensity](#screendensity) | Yes| No| Screen density of the device.<br>**System capability**: SystemCapability.Global.ResourceManager|
| deviceType | [DeviceType](#devicetype) | Yes| No| Type of the device.<br>**System capability**: SystemCapability.Global.ResourceManager|
## RawFileDescriptor<sup>8+</sup>
Defines the descriptor information of the raw file.
> - The methods involved in **ResourceManager** are applicable only to the TypeScript-based declarative development paradigm.
>
> - Resource files are defined in the **resources** directory of the project. You can obtain the resource ID using **$r(resource address).id**, for example, **$r('app.string.test').id**.
<td class="cellrowborder" valign="top" width="61.29%" headers="mcps1.1.5.1.4 "><p id="p8384132411379"><a name="p8384132411379"></a><a name="p8384132411379"></a>Asynchronous callback used to return the obtained array of strings.</p>
<td class="cellrowborder" valign="top" width="59.713561964146535%" headers="mcps1.1.5.1.4 "><p id="p8711172511406"><a name="p8711172511406"></a><a name="p8711172511406"></a>Asynchronous callback used to return the content of the obtained media file.</p>
<td class="cellrowborder" valign="top" width="76.98%" headers="mcps1.1.3.1.2 "><p id="p8713192517405"><a name="p8713192517405"></a><a name="p8713192517405"></a>Promise used to return the content of the obtained media file.</p>
<td class="cellrowborder" valign="top" width="59.713561964146535%" headers="mcps1.1.5.1.4 "><p id="p18403142618437"><a name="p18403142618437"></a><a name="p18403142618437"></a>Asynchronous callback used to return the obtained Base64 code of the image.</p>
<td class="cellrowborder" valign="top" width="76.98%" headers="mcps1.1.3.1.2 "><p id="p3406182612434"><a name="p3406182612434"></a><a name="p3406182612434"></a>Promise used to return the obtained Base64 code of the image.</p>
<td class="cellrowborder" valign="top" width="79.95%" headers="mcps1.1.3.1.2 "><p id="p1412792864011"><a name="p1412792864011"></a><a name="p1412792864011"></a>Promise used to return the device configuration.</p>
Obtains the specified number of singular-plural strings corresponding to the specified resource ID. This method uses an asynchronous callback to return the result.
<td class="cellrowborder" valign="top" width="59.713561964146535%" headers="mcps1.1.5.1.4 "><p id="p150864719611"><a name="p150864719611"></a><a name="p150864719611"></a> Asynchronous callback used to return the rawfile content, in byte arrays.</p>
<td class="cellrowborder" valign="top" width="65.66%" headers="mcps1.1.3.1.2 "><p id="p43128317109"><a name="p43128317109"></a><a name="p43128317109"></a> Promise used to return the rawfile content, in byte arrays.</p>