Function Info |
|---|
function ComponentInfo Component information class, including the app package name and screen information for displaying the activity screen. |
Constructor Name |
|---|
function ComponentInfo(String packageName, String className, String appType) Builds a ComponentInfo object. |
Qualifier and Type | Method Name and Description |
|---|---|
String | Obtains the app package name. |
String | Obtains the information about the screen displayed during an activity. |
String | Obtains the app type. |
- | setPackageName(String packageName) Sets the app package name. |
- | setClassName(String className) Sets the information about the screen displayed during an activity. |
- | setAppType(String appType) Sets the app type. |
Constructor |
|---|
function ComponentInfo(String packageName, String className, String appType) Builds a ComponentInfo object. |
Parameters
Name | Description |
|---|---|
packageName | App package name. |
className | Information about the screen displayed during an activity. |
appType | App type. Set this parameter to Harmony if you are developing a HarmonyOS app. |
Method |
|---|
ComponentInfo.prototype.getPackageName = function () {} Obtains the app package name. |
Returns
Type | Description |
|---|---|
String | App package name. |
Method |
|---|
ComponentInfo.prototype.getClassName = function () {} Obtains the information about the screen displayed during an activity. |
Returns
Type | Description |
|---|---|
String | Information about the screen displayed during an activity. |
Method |
|---|
ComponentInfo.prototype.getAppType = function () {} Obtains the app type. |
Returns
Type | Description |
|---|---|
String | App type. |
Method |
|---|
ComponentInfo.prototype.setPackageName = function (String packageName) { Sets the app package name. |
Parameters
Name | Description |
|---|---|
packageName | App package name. |
Method |
|---|
ComponentInfo.prototype.setClassName = function (String className) { Sets the information about the screen displayed during an activity. |
Parameters
Name | Description |
|---|---|
className | Information about the screen displayed during an activity. |
Method |
|---|
ComponentInfo.prototype.setAppType = function (String appType) { Sets the app type. |
Parameters
Name | Description |
|---|---|
appType | App type. |