ExamGecko
Home Home / Huawei / H14-231_V1.0

Huawei H14-231_V1.0 Practice Test - Questions Answers, Page 37

Question list
Search
Search

List of questions

Search

Related questions











If a developer uses custom components when developing a HarmonyOS application, what are the correct descriptions of custom components below?

A.
Add tag elements such as styleable and item to values/attrs.xml
A.
Add tag elements such as styleable and item to values/attrs.xml
Answers
B.
In the constructor with the AttrSet parameter of the custom component, use attrSet.getAttr('XxX').get().getStringValue() to get the property
B.
In the constructor with the AttrSet parameter of the custom component, use attrSet.getAttr('XxX').get().getStringValue() to get the property
Answers
C.
Add xmlns:app='http://schemas.huawei.com/apk/ res/ohos' to the layout.xml of the component definition
C.
Add xmlns:app='http://schemas.huawei.com/apk/ res/ohos' to the layout.xml of the component definition
Answers
D.
In the constructor of the custom component, call array.getlntegor(ResourceManager.styleab1e.***,100) to get the property
D.
In the constructor of the custom component, call array.getlntegor(ResourceManager.styleab1e.***,100) to get the property
Answers
Suggested answer: A, B, C, D

A developer called the getDefaultHost(Context context) interface of BluetoothHost to obtain a Bl1uetoothHost instance for managing local Bluetooth operations. The developer uses the following development steps to implement Bluetooth pairing:

1Turn on Bluetooth.

2Scan Bluetooth.

3. Initiate pairing.

Which of the following statements about steps 1, 2, and 3 is true?

A.
calls startBtDiscovery() to complete step 2
A.
calls startBtDiscovery() to complete step 2
Answers
B.
The order in which steps 2 and 3 are implemented can be reversed
B.
The order in which steps 2 and 3 are implemented can be reversed
Answers
C.
calls the enableBt() interface to complete step 1
C.
calls the enableBt() interface to complete step 1
Answers
D.
calls startPair() to complete step 3
D.
calls startPair() to complete step 3
Answers
Suggested answer: A, C, D

Which of the following descriptions is wrong when it comes to the simultaneous development of JS (JavaScript) and Java languages in HarmonyOS application development?

A.
Use Java to develop the UI of the application
A.
Use Java to develop the UI of the application
Answers
B.
JS FA calls Java PA
B.
JS FA calls Java PA
Answers
C.
Use JS to develop the logic of the application
C.
Use JS to develop the logic of the application
Answers
D.
Java FA (Feature Ability) calls JS PA (Particle Ability).
D.
Java FA (Feature Ability) calls JS PA (Particle Ability).
Answers
Suggested answer: A, C, D

A PageA contains Ability SliceA1 and AbilitySliceA2, which is displayed as AbilitySliceA1 by default. What are the following steps if you want to navigate directly to PageA's AbilitySliceA2 in PageB on the current device?

A.
Add a route for AbilitySliceA2 via addActionRoute() in PageA
A.
Add a route for AbilitySliceA2 via addActionRoute() in PageA
Answers
B.
Register the action corresponding to PageA in the configuration file
B.
Register the action corresponding to PageA in the configuration file
Answers
C.
Set the action in the Intent of the PageB navigation
C.
Set the action in the Intent of the PageB navigation
Answers
D.
Set Deviceld to empty in the Intent of the PageB navigation
D.
Set Deviceld to empty in the Intent of the PageB navigation
Answers
Suggested answer: A, B, C

Regarding Hongmeng's atomic service, the following statement is correct

A.
Atomic service is displayed as a card in the Services Hub that can be added to the desktop
A.
Atomic service is displayed as a card in the Services Hub that can be added to the desktop
Answers
B.
When an atomic service is managed and distributed by the Marketplace, its size cannot exceed 10 MB
B.
When an atomic service is managed and distributed by the Marketplace, its size cannot exceed 10 MB
Answers
C.
Atomic service is an installation-free application with an independent entrance
C.
Atomic service is an installation-free application with an independent entrance
Answers
D.
Atomic services correspond to one HAP package and are used to complete one specific convenience service
D.
Atomic services correspond to one HAP package and are used to complete one specific convenience service
Answers
Suggested answer: A, C

There is a configuration file named 'config.json' in the root directory of each HAP package of the HarmonyOS application, which mainly covers the following three aspects:

A.
The configuration information of the app on a specific device
A.
The configuration information of the app on a specific device
Answers
B.
Configuration information of all abilities in the current module
B.
Configuration information of all abilities in the current module
Answers
C.
Global configuration information for the app
C.
Global configuration information for the app
Answers
D.
HAP package configuration information
D.
HAP package configuration information
Answers
Suggested answer: A, C, D

When developing a HarmonyOS application, if you want to set the background color for a Text component in the page, the following is correct

A.
ohos:background_element='$graphic:background
A.
ohos:background_element='$graphic:background
Answers
B.
ohos:background_element='$color:green'
B.
ohos:background_element='$color:green'
Answers
C.
ohos:background_element='#0000FF'
C.
ohos:background_element='#0000FF'
Answers
D.
ohos:background_element='#880000FF'
D.
ohos:background_element='#880000FF'
Answers
Suggested answer: A, B, C, D

. When developing a HarmonyOS application, use a component Text as the title of a page, if you want to make the title invisible and still occupy the space of the current page, the following operations are correct

A.
ohos:visibility= 'invisible'
A.
ohos:visibility= 'invisible'
Answers
B.
text.setVisibility(Component.HIDE)
B.
text.setVisibility(Component.HIDE)
Answers
C.
ohos:visibility='hide'
C.
ohos:visibility='hide'
Answers
D.
text.setVisibility(Component.INVISIBLE)
D.
text.setVisibility(Component.INVISIBLE)
Answers
Suggested answer: A, D

A developer has developed a HarmonyOS application that remotely launches a Page on phone B, and which of the following permissions does not need to request the user to grant permission by sending a pop-up window at runtime?

A.
ohos.permission.GET_DISTRIBUTED_DEVICE_INFO
A.
ohos.permission.GET_DISTRIBUTED_DEVICE_INFO
Answers
B.
ohos.permission.DISTRIBUTED_DEVICE STATE_CHANGE
B.
ohos.permission.DISTRIBUTED_DEVICE STATE_CHANGE
Answers
C.
ohos.permission.GET_BUNDLE_INFO
C.
ohos.permission.GET_BUNDLE_INFO
Answers
D.
ohos.permission.DISTRIBUTED_DATASYNC
D.
ohos.permission.DISTRIBUTED_DATASYNC
Answers
Suggested answer: A, B, C

In HarmonyOS, Intents are the carriers for transferring information between objects, and which of the following items can be set through Intents?

A.
Deviceld
A.
Deviceld
Answers
B.
BundleName
B.
BundleName
Answers
C.
AbilityName
C.
AbilityName
Answers
D.
Action
D.
Action
Answers
Suggested answer: A, B, C, D
Total 705 questions
Go to page: of 71