Exam4Training

Huawei H14-231_V1.0-ENU HCIP-HarmonyOS Application Developer V1.0 Online Training

Question #1

When a developer uses HarmonyOS Device Manager, he wrote the following code, which code description is correct?

Vardevicelnto=dmInstance.getLocaIDevicelnfoSync () :

  • A . Obtain the local device information synchronously
  • B . Asynchronously obtain the list of trusted devices
  • C . Obtain the list of trusted devices synchronously
  • D . Asynchronously obtain local device information

Reveal Solution Hide Solution

Correct Answer: C
Question #2

Which of the following atomic layout capabilities does not belong to the position of the control element?

  • A . Percentage
  • B . Hidden
  • C . Split the line
  • D . stretch

Reveal Solution Hide Solution

Correct Answer: D
Question #3

When I use the interface to set the system time in HarmonyoS, which of the following is the smallest time unit?

  • A . minute
  • B . seconds
  • C . microseconds
  • D . ms

Reveal Solution Hide Solution

Correct Answer: D
Question #4

Which of the following products belongs to the security products in the smart home ecology?

  • A . Large-screen refrigerator
  • B . smart door lock
  • C . Rice cooker
  • D . Water heater

Reveal Solution Hide Solution

Correct Answer: B
Question #5

When a HarmonyOS app developer uses the form container, which of the following elements can be submitted and reset?

  • A . Menu
  • B . List
  • C . Input
  • D . Image

Reveal Solution Hide Solution

Correct Answer: C
Question #6

Browse articles in the reading app on your phone, migrate to the tablet to continue viewing, and exit

the reading app on your phone.

Which HarmonyOS streaming solution is used in this scenario?

  • A . Multi-terminal migration
  • B . Multi-terminal collaboration
  • C . Cross-terminal collaboration
  • D . Cross-terminal migration

Reveal Solution Hide Solution

Correct Answer: D
Question #7

What is the process of cross-terminal migration from an application on HarmonyOS device A to the application on device B by calling the distributed task scheduling capability to continue sbility?

  • A . Preparation for circulation
  • B . Circulation
  • C . End of circulation
  • D . The circulation is complete

Reveal Solution Hide Solution

Correct Answer: D
Question #8

Which of the following modules does a developer need to call to check whether the HarmonyOS cellular data service is enabled?

  • A . @ohos.telephony.sms
  • B . @ohos.telephony.data
  • C . @ohos.telephony.sim
  • D . @ohos.telephony.call

Reveal Solution Hide Solution

Correct Answer: A
Question #9

Which of the services provided by the HarmonyOS Connect solution is Device Parter?

  • A . Official Documentation
  • B . Service platform
  • C . Training support
  • D . Certification Testing

Reveal Solution Hide Solution

Correct Answer: B
Question #10

After the creation of a custom component of the Web development paradigm, which of the following callbacks will be triggered when it is added to the Page component tree?

  • A . Onlnit
  • B . OnAttached
  • C . OnLayoutReady
  • D . OnDetached

Reveal Solution Hide Solution

Correct Answer: A

Question #11

Which of the following modules provides an E2E encrypted channel in the HarmonyOS streaming architecture to provide a secure cross-terminal transmission mechanism for user applications?

  • A . distributed soft bus
  • B . Forwarding task management services
  • C . Distributed security
  • D . Distributed task scheduling

Reveal Solution Hide Solution

Correct Answer: C
Question #12

Which of the following interfaces can repeatedly call a function with a fixed time delay between each call?

  • A . setTimeout?
  • B . setlnterval
  • C . clearTimeout
  • D . clearlnterval

Reveal Solution Hide Solution

Correct Answer: B
Question #13

Which of the following is NOT part of the software exposure capabilities provided by HarmonyOS Connect?

  • A . chip
  • B . Cloud services
  • C . Huawei HarmonyoS operating system
  • D . Device Partner Platform

Reveal Solution Hide Solution

Correct Answer: A
Question #14

In the declarative development paradigm, which of the following decorator decorated state variables needs to be initialized locally, and the initialized value can be overridden by the construction parameters?

  • A . @State
  • B . @ObjectLink
  • C . @StorageLink
  • D . @Prop

Reveal Solution Hide Solution

Correct Answer: A
Question #15

In the HarmonyOS system architecture, which of the following can shield the differences between multiple cores and provide basic kernel capabilities for the upper layer?

  • A . Ability
  • B . KAL (Kernel Abstract Layer)
  • C . UI
  • D . HDF (Hardware Driver Foundation)

Reveal Solution Hide Solution

Correct Answer: B
Question #16

When a developer uses Page Ability to open a ServiceAbility, he needs to pass parameters through Intent, at what stage is the parameter obtained in the whole process null?

onStart( ) in A S ervice.

  • A . bility
  • B . PageAbility
  • C . ServiceAbility
  • D . ServiceAbility

Reveal Solution Hide Solution

Correct Answer: B
Question #17

When a developer clicks the exit button of an application to release Page Ability resources, which callback method in the Page Ability lifecycle will be triggered?

  • A . onStop()
  • B . onlnactive()
  • C . onForeground()
  • D . onBackground()

Reveal Solution Hide Solution

Correct Answer: A
Question #18

In order to help users find data in the app through the global search app, a HarmonyOS developer needs to index the data of the app and configure the global search searchable entities.

Which of the following interfaces can the developer choose to index their application data?

  • A . Converged search interface
  • B . Distributed data service interface
  • C . Data storage management interface
  • D . Relational data services

Reveal Solution Hide Solution

Correct Answer: A
Question #19

Which of the following fields is not within the scope of permission?

  • A . privileged
  • B . signature
  • C . restricted
  • D . deivced

Reveal Solution Hide Solution

Correct Answer: D
Question #20

If a HarmonyOS engineer is about to debug a HarmonyOS application on an emulator device, which of the following debugging processes is correct?

  • A . Check the properties of the config.json file→ set the installation method of the hap package→ set the debugging code type→ start debugging
  • B . Set the installation mode of the HAP package→ set the debugging code type→ check the properties of the configjson file → start debugging
  • C . Set the installation method of the HAP package→ check the properties of the configjson file→ set the debugging code type→ start debugging
  • D . Set the debugging code type→ check the properties of the config.json file→ set the installation method of the HAP package→ start debugging

Reveal Solution Hide Solution

Correct Answer: D

Question #21

If a developer wants to use the video playback function of HarmonyOS, which of the following subsystems will he use?

  • A . Media Subsystem
  • B . Safety subsystem
  • C . AI subsystem
  • D . Location Services Subsystem

Reveal Solution Hide Solution

Correct Answer: A
Question #22

A developer is developing a ticket booking application, in the selection of the location of the ticket, you need to use the slide selector Picker, in order to highlight the selected text, the developer sets the rendering effect that the selected text margin is greater than the ordinary text margin.

Which of the following settings are correct?

  • A . <Picker…… ohos:selected_normal_text_margin_ratio="5.0"/>
  • B . Picker.setSelectNormal TextMarginRatio(5.0f);
  • C . <Picker…… ohos:selected_normal_text_margin_ratio="0.5"/>
  • D . Picker.setSelectNormalTextMarginRatio(5.0);

Reveal Solution Hide Solution

Correct Answer: B
Question #23

Which description of the HarmonyOS clipboard can be correctly interpreted in the following scenarios?

  • A . can be copied in application A, but cannot be pasted in application B
  • B . can be copied and pasted into app B in app A
  • C . Only replication is supported
  • D . Only clipping is supported

Reveal Solution Hide Solution

Correct Answer: B
Question #24

The HarmonyOS video module supports the development of video services and the opening of the ecosystem, allowing developers to easily play, operate, and develop new functions of video media through the open interfaces. Video playback includes playback controls, playback settings, and playback queries, such as start/stop playback, playback speed settings, and whether to loop playback.

When developing a video playback feature, which of the following steps is correct?

  • A . Create a Player instance→ construct a data source object and set the media source → call method prepare(), →call method play(), call method stop(→→ call method release()
  • B . Create a Player instance → call the prepare() → play() → construct the data source object and set the media source→ call the stop() → release().
  • C . Construct a data source object and set the media source→ create a Player instance→ call method play(), →call method prepare(), →call method stop(→ call method release()
  • D . Call the prepare() method → create a Plawer instance→ construct a data source object and set the media source → call method→ create a Player instance, Play() → call method stop() → call method release()

Reveal Solution Hide Solution

Correct Answer: A
Question #25

When the engineer is developing JS (JavaScript), the application can successfully load the local image in the common path, but cannot load the network image.

  • A . ohos.permission.READ.MEDIA
  • B . ohos.permssion.WRITE_MEDIA
  • C . ohos.permission.INTERNET
  • D . ohos.permission.GET_NETWORK_INFO

Reveal Solution Hide Solution

Correct Answer: C
Question #26

Which of the following subsystems is not part of the basic software service subsystem of HarmonyoS?

  • A . Event Notification Service subsystem
  • B . Telephone service subsystem
  • C . Multimedia subsystem
  • D . Location Services subsystem

Reveal Solution Hide Solution

Correct Answer: D
Question #27

In HarmonyOS, which of the following scenarios is the application responsible for instantiation?

  • A . Jump to another page through a hyperlink
  • B . reads a novel through a web page and accidentally clicks on an advertisement, which jumps directly to the app store to request the download of a certain game
  • C . An app page has messages, contacts, settings, etc., and you can switch between them
  • D . Start an AbilitySlice by navigating

Reveal Solution Hide Solution

Correct Answer: C
Question #28

HarmonyOS supports developers to customize permissions in the "reqPermissions" field to access permission-protected objects

  • A . config.json
  • B . ability_main.xml
  • C . MainAbilityS1ice.java
  • D . string.json

Reveal Solution Hide Solution

Correct Answer: A
Question #29

When a developer uses the Text component for development, due to the long length of the input string, the content in the middle of the text needs to be truncated with ellipses.

Which of the following codes can be used to achieve the above requirements?

  • A . ohos:truncation_mode=ellipsis_at_start
  • B . ohos: truncation_mode=auto_scrolling
  • C . ohos:truncation_mode=ellipsis_at_middle
  • D . ohos:truncation_mode=ellipsis_at_end

Reveal Solution Hide Solution

Correct Answer: C
Question #30

If a developer wants to achieve the effect of page swiping in an application, which of the following components does the developer need to select?

  • A . PageSlider
  • B . ToastDialog
  • C . webView
  • D . ProgressBar

Reveal Solution Hide Solution

Correct Answer: A

Question #31

If a UI is no longer visible to the user, but you don’t want to destroy it, which method will the system call to release the corresponding resources?

  • A . onForeground()
  • B . onInactive( )
  • C . onPause()
  • D . onBackground( )

Reveal Solution Hide Solution

Correct Answer: D
Question #32

In the HarmonyOS system architecture, which of the following provides unified peripheral access capabilities and driver development management framework?

  • A . KAL (Kernel Abstract Layer)
  • B . Ability
  • C . UI
  • D . HDF (Hardware Driver Foundation)

Reveal Solution Hide Solution

Correct Answer: D
Question #33

A developer designs a game application with MainAbility on the home page, click the game icon on the desktop, and then press the Home button to hide the game in the background, how does the life cycle of MainAbility change?

  • A . onStart ()→onResume()―onInActive()→onBackground()
  • B . onStart()→onActive()→onInActive()→onStop()
  • C . onStart()―onActive()→onInActive()
  • D . onStart()→onActive()→onlnActive()→onBackground()

Reveal Solution Hide Solution

Correct Answer: D
Question #34

When the user clicks on a song from the music list page and jumps to the playback interface of the song, the principle is that the page route routes to the destination page according to which of the following?

  • A . router.push
  • B . router.back
  • C . uri
  • D . intent

Reveal Solution Hide Solution

Correct Answer: C
Question #35

If a developer wants to develop a page with a tab function, the developer can use the TabList component provided by HarmomyOS.

If you want to set the horizontal center alignment of text, which of the following codes is correct?

  • A . ohos:text_alignment=start
  • B . ohos:text_alignment=bottom
  • C . ohos:text_alignment=vertical_center
  • D . ohos:text_alignment=horizontal_center

Reveal Solution Hide Solution

Correct Answer: D
Question #36

A developer defines an entity class Student.java and uses the following code to construct a teaching table:

Entity(tableName="student",ignoredColums =["ignoredColumn1"," ignoredColumn2", indices =(@Index(value =("firstName." ,"lastName",name="name_index", unique = true)))

Public class User extends OrmObject{

@PrimaryKey(autoGenerate= true)

Private Integer userld;

Private String firstName;

Private String lastName;

Private int age;

Private double balance;

Private int ignoredColumnl;

Private int ignoredColumn2;

}

Which of the following descriptions of this code is wrong?

  • A . lgnoredColumns indicates that the field does not need to be added to the attributes of the student table
  • B . lndices creates a composite index name_index for the firstName and 1astName fields
  • C . The name of the data table is student
    The index value of the
  • D . composite index name_index is not unique

Reveal Solution Hide Solution

Correct Answer: D
Question #37

Now a Text component is used as the title of a page, and Text needs to be set to be invisible, but it still occupies the current layout space, which of the following is correct?

  • A . ohos:visibility= hide
  • B . text.setVisibility(Component. VISIBLE)
  • C . ohos:visibility=visible
  • D . ohos: visibi1ity=invisible

Reveal Solution Hide Solution

Correct Answer: D
Question #38

The default size of shared memory in Harmony OS is ?

  • A . 8M
  • B . 4M
  • C . 2M
  • D . 1M

Reveal Solution Hide Solution

Correct Answer: C
Question #39

TaskDispatcher is the basic interface for Ability to distribute tasks, which hides the implementation details of the thread where the task is located.

To ensure that the application is more responsive, we respond to the priority of the design task, which of the following is not the priority of the task?

  • A . MIDDLE
  • B . HIGH
  • C . DEFAULT
  • D . LOW

Reveal Solution Hide Solution

Correct Answer: A
Question #40

In order to test the distributed file service functions of application A and application B, the developer installs application A and application B on both device 1 and device 2. During the test, application A on device 1 creates a distributed file X, and application B on device 2 creates a distributed file Y.

Which of the following descriptions of this scenario is wrong?

  • A . If Device 1 and Device 2 are logged in to different HarmonyoS accounts, distributed file sharing cannot be implemented
  • B . If device 1 runs out of power and causes the device to go offline, distributed file X cannot be accessed
  • C . With distributed file services, application A on device 1 is able to read and write file Y on device 2
  • D . Application A and Application B need to apply for ohos.permission.DISTRIBUTED_DATASYNC permissions to use the full functionality of the distributed file service

Reveal Solution Hide Solution

Correct Answer: C

Question #41

Which of the following is NOT a capability provided by Distributed Device Virtualization in HarmonyOS?

  • A . device is virtual
  • B . Decision-making centre
  • C . Device management
  • D . Data Processing

Reveal Solution Hide Solution

Correct Answer: B
Question #42

In order to cope with complex application business logic, a developer needs to create multiple threads to perform multiple tasks. In this case, the code is complex and difficult to maintain, and the interaction between tasks and threads becomes more complex.

To solve this problem, which of the following interfaces can the developer use to distribute different tasks?

  • A . TaskDispatcher
  • B . Group
  • C . lAbilityMlanager
  • D . BackgroundTaskManager

Reveal Solution Hide Solution

Correct Answer: A
Question #43

What lifecycle processes will be triggered when a developer creates a Page instance and lets the instance be displayed in the foreground?

  • A . onStart()→onActive()
  • B . onStart() →onActive() →onInactive()
  • C . onBackground()→onForeground()→onStop()
  • D . onActive() →onInactive()

Reveal Solution Hide Solution

Correct Answer: A
Question #44

If a developer wants to develop an application on a smart screen, which of the following subsystems will he use?

  • A . DV subsystem
  • B . Proprietary business subsystem of smart screen
  • C . Media Subsystem
  • D . Safety subsystem

Reveal Solution Hide Solution

Correct Answer: B
Question #44

If a developer wants to develop an application on a smart screen, which of the following subsystems will he use?

  • A . DV subsystem
  • B . Proprietary business subsystem of smart screen
  • C . Media Subsystem
  • D . Safety subsystem

Reveal Solution Hide Solution

Correct Answer: B
Question #44

If a developer wants to develop an application on a smart screen, which of the following subsystems will he use?

  • A . DV subsystem
  • B . Proprietary business subsystem of smart screen
  • C . Media Subsystem
  • D . Safety subsystem

Reveal Solution Hide Solution

Correct Answer: B
Question #44

If a developer wants to develop an application on a smart screen, which of the following subsystems will he use?

  • A . DV subsystem
  • B . Proprietary business subsystem of smart screen
  • C . Media Subsystem
  • D . Safety subsystem

Reveal Solution Hide Solution

Correct Answer: B
Question #44

If a developer wants to develop an application on a smart screen, which of the following subsystems will he use?

  • A . DV subsystem
  • B . Proprietary business subsystem of smart screen
  • C . Media Subsystem
  • D . Safety subsystem

Reveal Solution Hide Solution

Correct Answer: B
Question #49

Call NetManager.getInstance(Context9) to get the instance object of network management.

When the developer combed through the development steps, the above steps were sorted according to the order in which the features were completed in the code.

Which of the following is the correct order?

  • A . 4→1→2→3
  • B . 4→2→1→3
  • C . 4→3→2→1
  • D . 2→1→4→3

Reveal Solution Hide Solution

Correct Answer: C
Question #50

How should a developer choose the Debug Type if he needs to debug JAVA code separately in a JS+JAVA hybrid project?

  • A . Native only
  • B . Dual (JS + JAVA)
  • C . JAVA only
  • D . Js only

Reveal Solution Hide Solution

Correct Answer: C

Question #51

In HarmonyOS application development, where can commonly used backgrounds, such as common text backgrounds and button backgrounds, be placed?

  • A . graphic
  • B . media
  • C . layout
  • D . element

Reveal Solution Hide Solution

Correct Answer: A
Question #52

If a developer needs to solve problems such as insufficient image resolution and image compression noise, which of the following AI capabilities can be used by HarmonyOS?

  • A . Document Detection Correction
  • B . General Character Recognition
  • C . Entity Recognition
  • D . Image super-resolution

Reveal Solution Hide Solution

Correct Answer: D
Question #53

Which of the following subsystems does a developer use when using the facial recognition feature of HarmonyOS?

  • A . Multi-mode input subsystem
  • B . Media Subsystem
  • C . Safety subsystem
  • D . Graphics subsystem

Reveal Solution Hide Solution

Correct Answer: C
Question #54

How do I define the permissions correctly when a developer needs to customize the permissions for a third-party application for Harmony OS?

  • A . module: {
    reqPermissions: [{ name:com.myability.permission.MYPERMISSION,grantMode:system_grant, availableScope: [signatures]
    }
    }
  • B . module: {
    defPermissions: [{ name:name:com.myability.permission.lNTERNET, grantMode:user grant,
    availableScope: [signatures]
    }
    }
    module: {
    defPermissions: [{
  • C . name:name:com.myability.permission.INTERNET, grantMode:system_grant,
    availableScope: [signatures]
    }
    }
    module: {
    defPermissions: [{
  • D . name:name:com.myability.permission.MYPERMISSION, grantMode:system_grant,
    availableScope: [signatures]
    }
    }

Reveal Solution Hide Solution

Correct Answer: D
Exit mobile version