HCIP-HarmonyOS Application Developer V1.0 Questions and Answers
A developer has developed a news browsing application, and the news list page is displayed by default when the application is opened, which of the following methods does the developer use to achieve this function?
When a developer is developing a smart home application, the Switch component will be used to represent the switch of some devices, and ON should be displayed on the ON status component and OFF should be displayed on the closed state component, what are the following options that can meet the requirements?
In the distributed terminal scenario, only by ensuring that the equipment used by theuser is safe and reliable can the user's data be effectively protected on the virtual terminal and avoid the leakage of user privacy. What does HarmonyOS do to ensure that your devices are reliable?
A HarmonyOSengineer needs to apply for a digital certificate to complete the release of the application, which of the following descriptions of digital certificates is wrong?
Which of the following descriptions is wrong when it comes to the simultaneous development of JS (JavaScript) and Java languages in HarmonyOS application development?
After the release of the open beta version, how do the invited test users experience?
When a developer uses the distributed task scheduling capability of HarmonyOS, which of the following features can be selected by the developer?
Cross-terminal migration and collaboration are the capabilities of which HarmonyOS feature
In the game scene, when playing games on the smart screen, you can use the mobile phone as a remote control handle, and with the help of the mobile phone's gravity sensor, acceleration sensor, and touch ability, it provides players with a more convenient and smooth gaming experience. What distributed capabilities are used to use the mobile phone as a remote control controller in this scenario?
When a developer develops a HarmonyOS application and uses an intent pass object, which of the following descriptions of intent are correct?
Which of the following databases uses SQLite as the persistent storage engine in HarmonyOS data management?
Which of the following items are correctly described about the HarmonyOS distributed database?
The software engineer will encode the data, which can take two coding methods: ordinary and pipeline, which of the following are the differences between these two coding methods?
A developer is developing a flight booking application, and uses the sliding selector Picker to select the location of the ticket and writes the following code.
When a developer sets a background for a Text component, which of the following methods are correct?
Which of the following classes is the base class for JavaScript FA (Feature Ability) to run on HarmonyOS?
HarmonyOS adopts a multi-core design, which supports the selection of appropriate OS kernels for different resource-constrained devices, and the kernel abstraction layer provides basic kernel capabilities for the upper layer by shielding the differences between multiple cores, including which of the following?
In which of the following files can you set the path configuration information of the page?
The meta-service package consists of one or more HAP packages, and each HAP package shall not exceed ( ) to provide a second-to-open experience.
Where is the data of the preference placed after persistence?
If a HarmonyOS engineer needs to apply for a digital certificate to complete the application release, what are the errors in the following descriptions of digital certificates?
In a live broadcast scenario, where the anchor uses an action camera as the live broadcast camera, what are the distributed capabilities of HarmonyOS used in this scenario?
When a developer develops a news software, he will use the marquee of the Text component to realize the automatic scrolling of information, and before setting the marquee effect, he needs to set some preconditions for the Text component.
A HarmonyOS application developer creates two pages, indlex and detai1, so that the two pages jump to each other. The code of the index page is as follows, which of the following descriptions are correct?
If a developer wants to set up a dial pad, he will use round buttons and capsule buttons, what are the shape types that will be used in the background layer?
Which modules in the following figure can be installed and operated independently?
If the user migrates the video on the machine to the smart screen for playback, which of the following callback methods can save the video playback data on the mobile phone?
In HarmonyOS, there are some applications that can call out universal cards, which can bring you the experience of using ().
API9 and above, router.pushUrl() method, what is the default mode used by the jump page?
A developer uses a task distributor to dispatch tasks 1, 2, and 3. The developer added Task 1 and Task 2 to a task group and used syncDispatchBarrier to set up a task execution barrier on that task group. During execution, the discoverer waits for both task 1 and task 2 to be executed before executing task 3. Based on the above scenario analysis, which of the following task distributors may be used by the developer?
When using HarmonyOS distributed terminals, which of the following items can ensure that the system is safe and reliable?
When developing an application, a developer uses the WLANP2P function to realize point-to-point data transmission between devices. The functionality of the application is as follows: Function 1: Discover the peer device. Function 2: Create and remove groups. Function 3: Initiate a connection to the peer device. Which of the above features is correct in the following descriptions?
The Web-like development paradigm provides a series of lifecycle callback methods for custom components, which are the following lifecycle callback methods for developers to manage the internal logic of custom components?
In HramonyOS, which of the following can developers use the static animation feature to achieve?
How to set reverse playback in attribute animation?
Whichof the following subsystems in Harmony OS can achieve data isolation between applications?
DevEco studio provides remote simulator developers to run and debug HMOS applications, which of the following limitations will the remote simulator have?
To test the HarmonyOS Bluetooth Low Energy function, a developer uses a central device to call the startScan() interface and scans for a peripheral device. In order for the central device to complete the data exchange with the peripherals, the developer implemented the following development steps.
In order to control the access of a specific interface to the caller, an application confirms that the visitor has the required permissions through verifyCallingPermission. Which of the following descriptions is correct?
When a developer calls Particle Ability (PA) with FA (Feature Ability), callAbility returns the error "Internal ability not register.", what key steps does the developer need to check?
A developer creates MyAbility with FooAbilitySlice and BarAbilitySlice, and currently FooAbilitySlice is in the foreground and gets focused, and then navigates to BarAbilitySlice, what happens to the lifecycle state in this period?
When is the aboutToAppear() of the custom component executed?
Which field must the meta service package name end in?
For example, if you want to implement an advertising pop-up window now, including information such as pictures and text, you can use the following pop-up window
When a programmer develops an online education application, the studentAnswer:ing interface has multiple choice questions and multiple choice questions, which of the following components is suitable for displaying multiple choice questions?
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?
When a developer designs a JavaScript login page, he needs to use Internal Ability to call Data Abiliity to verify the username and password, which of the following can be modified to complete the function?
const ABILITY_TYPE_EXTERNAL=0;
var action=0;
action.bundleName="com.huawei.loginservice"; action.abilityName="com.huawei.loginservice.LoginDataAbility";
action.messageCode=ACTION_MESSAGE_CODE_PLUS;
action.data=actionData;
action.abilityType=ABILITY_TYPE_EXTERNAL; action.syncOption=ACTION_SYNC;
var result=await
FeatureAbility.callAbility(action);
With regard to Web components, the following is incorrect
Atomic service is a future-oriented service delivery method provided by HarmonyOS, which of the following statements about atomic service is correct?
Which of the following items are involved in migrating Page from device A to device B?
Which of the following properties about Web components is incorrect?
There are two Text components in the Row component, if the justifyContent alignment method is used, which of the following properties can be aligned to the left and right ends
In HarmonyOS, which of the following scenarios is the application responsible for instantiation?
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?
The engineer fails to access the network through the get request, and the prompt 'Attempt to invoke virtual method' is displayed, which of the following permissions should be configured in config.json?
Which of the following descriptions of the HarmonyOSclipboard function is correct?
Which of the following subsystems does a developer use when using the facial recognition feature of HarmonyOS?
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?
In the JS (JavaScript) UI framework, which layer is used to complete the front-end page parsing?
When a developer develops a JavaScript application on a smart screen. If you want to do some static animation, if you want to move a component 200px horizontally, which of the following styling configurations is correct?
When a developer develops a HarmomyOSapplication, if a Text component is used as the title bar of the page, and its width is set to match_parent and its height is set to 50vp, how can the text content in the Text be centered when setting its properties in the layout file?
Which of the following descriptions of Page and AbilitySlice is correct?
If a developer needs to use asyncDispatBarrionr to set up a barrier asynchronously, in this scenario, in order to separate different task groups, which of the following can the developer choose?
Which of the following fields is not within the scope of permission?
Which of the following descriptions of the HarmonyOSclipboard function is correct?
If a HarmonyOS engineer is about to debug a HarmonyOS application on an emulator device, which of the following debugging processes is correct?
A developer uses the threading function of HarmonyoS and writes the following code, which is the correct order of the execution result of the code?
TaskDispatcher globalTaskDispatcher =
getGlobalTaskDispatcher(TaskPriority.DEFAULT);
globalTaskDispatcher.syncDispatch(new
Runnable(){
@Override
public void run(){
HiLog.info (LABEL_LOG,"sync task1 run");//1
HiLog.info (LABEL_LOG, "after sync task1");//2
globalTaskDispatcher.syncDispatch(new
Runnable(){
@0verride
pub1ic void run(){
HiLog.info(LABEL_LOG,"sync task2 run"); 3
}
});
HiLog.info (LABEL_LOG, "after sync task2");//4
A developer tries to update the text of Text directly in a non-UI thread, but the update fails, how to solve the problem of updating the UI of the non-UI thread in HarmomyOS??
How do I define the permissionscorrectly when a developer needs to customize the permissions for the Harmony OS third-party application?
Which option is not the process of decoding in the conversion of the following information?
Which of the following modules does a developer need to call to check whether the HarmonyOS cellular data service is enabled?
A developer needs to use the current data network for socket data transmission, and the development process involves the following steps:
1。Send data with sockets.
2。Bind the network with NetHandle.bindSocket().
3。Call NetManager.getDefaultNet() to get the default data network.
4。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?
Before developing the NFC function, a HarmonyOS developer must first confirm whether the device supports the NFC function and whether the NFC is turned on.
A developer is developing an online education application, and there are multiple choice questions and multiple choice questions in the studentAnswer:interface, which of the following components is suitable for displaying multiple choice questions?
Which of the following scenarios does not use encoding technology?
When a developer receives a new product demand and asks users to remake old documents such as paper letters into electronic versions, the application can improve the remake effect of the old documents and make the work more correct. What kind of AI-enabled capabilities can be leveraged by HarmonyOSto achieve this?
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?
When an engineer needs to add the function of recording video when developing an application, which of the following interfaces should be called?
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 developer has developed an Image component and written the following code, which of the following descriptions of the component is correct?
If the user displays the navigation information on the mobile phone and the smart watch at the same time, if the smart watch is out of power, causing the navigation information to terminate the display, which callback method will the navigation application on the mobile phone receive the termination notification?
In the JavaScript UI framework, which layer is used to provide animation parsing, DOM (Document Object Model) tree construction, layout calculation, rendering command construction and drawing, event management, etc.?
When a developer is developing a game application, in order to display the download progress of game resources, it is necessary to use a horizontal linear progress bar, which of the following components can help the developer complete this function?
When a developer needs to create a Service Ability when developing a background service, which of the following processes is NOT the step to create the Ability?
A developer uses HarmonyOS to write half of an email on his mobile phone and click the transfer button to the tablet to continue editing the email.
A developer found that the app could not usethe network management function of Harmony OS without requesting permissions. In order to use the network management feature, the developer requested the following permissions for their app, which of them is not required for the network management feature?
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?
WhenthePage of Harmony OS executes the onForeground() callback, which of the following states will the Page return to first?
If a developer wants to develop a file background download function, there needs to be a Page Ability to provide UI pages, and a Service Ability to provide the background file download function. Which of the following can call Service Ability in Page Ability?
If a developer needs to use asyncDispatchBarrier to set up a barrier asynchronously, in this scenario, in order to separate different task groups, the developer can choose which of the following task dispensers?
Which of the following security mechanisms can ensure that application data is not maliciously used?
Which of the following options is allthe components ofthe Harmony OS package?
A developer has developed with the Text component, and the effect is as follows, which piece of code can be used to achieve the effect?
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?
How do I define the permissionscorrectly when a developer needs to customize the permissions for a third-party application forHarmony OS?
After a developer sets :ohos:layout_ alignment="horizontal _center" in the Text component, he writes: text.setTranslationX(600) in the code, where is the Text displayed in the parent layout?
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.
If a developer wants to develop an application on a smart screen, which of the following subsystems will he use?
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?
When a developer specifies a music playback service through an intent when closing a remote service, the developer can realize the ability to disable music playback on remote devices.
The distributed soft bus is the base for communication between various devices, which of the following does not belong to the bus hub of the distributed soft bus?
When a developer needs to specify the exact coordinates of the x-axis and y-axis of a sub-component when laying out a component, which layout can be used to achieve this function?
When a developer calls HarmonyOS Abi1ity Resources (HAR) in an application module, he or she needs to merge the config.json file of HAP and the config.json file of HAR into a single config.json file when compiling and building a HarmonyS Ability Package (HAP). During the merging process, under what circumstances will the values of tags conflict?
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 developer uses continueAbility() to migrate the distributed news application of the mobile phone to the large screen, and the large screen can also migrate the news browsing page back to the mobile phone.
In order to improve the image quality of network source images, developers can use the Instant Messaging (IM) class intent recognition interface provided by HarmoyOS.
When a developer is developing a HarmonyOS application, if part of the text in the value field of the JSON resource files of different types of elements in the Element directory does not need to be processed by the translator and will not be displayed on the application interface, a special structure can be used to identify the content that does not need to be translated
If a third-party application has registered the callback of the airplane mode setting item in advance, when the user modifies the airplane mode status of the terminal through the system settings, the application will detect the change of this setting item and adapt it. If the airplane mode is detected to be turned off, the app will go offline, and if the airplane mode is detected and turned on, the app will recapture the online data.
In multiple distributed devices with the same HarmonyOS account, after logging in to an app, the app can synchronize the app account authentication information (account name, token or other) to other devices as needed.
If the third-party library used by the developer involves permission management, the permission needs to be declared one by one in the config.json file of the application.
JavaScript FA (Feature Ability) lifecycle events are divided into application lifecycle and page lifecycle.
In HarmonyOS, by default, the UI interface is displayed and updated in the main thread
With the help of HarmonyOS's Al capability, it can detect and recognize the text of image sources such as document remakes and street view reproductions, and can also be integrated into other applications to provide text detection and recognition functions, and provide translation, search and other related services based on therecognition results. This is by taking advantage of the super-resolution of text and images in AI.
HarmonyOS not only has the system capability of a single device, but also supports deployment on multiple devices with different memory sizes based on the same set of system capabilities
In HarmonyOS, both relational databases and object-relational mapping databases can use SQL statements to manipulate databases.
HarmonyOS's relational database and object relational mapping database are both based on SQLite.
In the lifecycle of AbilitySlice, the onStart() callback method does not need to be rewritten.
HarmonyOS provides the Al capability of Instant Messaging (IM) intent, which can convert speech signals into text or commands, and identify the user's intent represented by the message content.
The atomic service consists of one or more HAP packets, andone HAP packet corresponds to one FA or one PA. Each FA or PA can be operated independently to perform 1 specific function.
In a HarmonyOS application, there must be one and only one HAP of the feature type.
A manufacturer used HarmonyoS to produce a dash cam (memory is 64MB), which is small in size and light in weight, and is a lightweight system device.
In order to avoid affecting the startup speed, developers need to postpone the execution of non-essential time-consuming tasks until the time of use, instead of performing all initializations in the onStart() method.
The global search portal provided on HarmonyOS has a desktop drop-down search box or a negative screen search box.
HarmonyOS application packages are released in the form of application packs, which are composed of one or more HAPs (HarmonyOS Ability Packages) and pack.info describing each HAP attribute.
Sservice Abilit calls the onCommand() method after the creation is completed, and the method can be called once when the client starts the service for the first time, and there is no need to call it again in the future
In the Javascript UI framework, to realize the jump between pages, you need to specify the uri in the page routing router to find the target page.
If a developer wants to develop a file background download function, there needs to be a Page Ability to provide UI pages, and a ServiceAbility to provide a background file download function. If you want to perform some operations in the Service Ability after connecting to the Service Ability in the Page Ability, you need to implement the onConnect() method in the Service Ability.
HarmonyOS provides access to external storage devices, such as USB flash drives, SD cards, etc.
In the process of developing an application based on HarmonyOS, in order to avoid applying for permissions that are unrelated to the user's required functions, a developer uses the UUID generated by the application instead of the device ID to reduce the permission application. The developer's actions exemplify the principle of applying for permissions in the vicinity.
When using the location capability of HarmonyOS, developers need to apply for the LOCATION permission, which is a non-sensitive permission and needs to be declared in config.json.
The application package names of the application projects created by JavaSaript and the applications compiled by the Java projects are HAR (HarmonyOS Ability Resources) and HAP (HarmonyOS Ability Package), respectively.
When a developer navigates within the same page, the AbilitySlice is new, even if present(newTargetSlice(), new Intent()) is repeatedly called, it will not cause any AbilitySlice to be out of the stack.
In JavaScript UI development, for wearable projects and TV projects, the name of the homepage can be not index, and the first page in the pages configuration list is the homepage; for the litewearable project, the name of the homepage must be index.
When a developer starts a music player on a remote device, he or she may not fill in the Deviceld of the remote device.
When a developer develops an application based on HarmonyOS, the data used by a developer can be decomposed into multiple objects. The developer needs to add, delete, modify, and check the teaching data, but does not want to write overly complex SQL statements. In this scenario, the developer can use an object-relational mapping database to process the data.
HarmonyOS's distributed soft bus enables distributed management of application data and user data.
The callback mechanism provided by the Ability class can enable the Page instance to switch in the background following the user's operation.
A home appliance manufacturer used HarmonyOS to produce a high-end refrigerator with a display (256MB of memory), which is not part of HarmonyOS's standard system device.
The Ability (referred to as "Service") of the Service template is only used for background running tasks, and the priority of background Services is relatively low, and when the resources are insufficient, the system may recycle the running background Service
In DevEco Studio, engineers can log in to the emulator after passing the real-name authentication of their HUAWEI ID.
When a developer uses the JS (JavaScript) UI framework to develop an application, if style =width:"10px is used in the component, the width of the component cannot be dynamically modified. If you use style="width:{{width}}" to set the width of a component, you can dynamically modify the width of the component in a JS file.
When designing a JavaScript UI based on HarmonyOS, if the text component itself cannot be focused, the focus cannot be moved to the component, and the focusableattribute of text is set to true. text component.
The data generated by a developer's use of Data Ability can be shared between different applications on the same device, but cannot be shared across devices.
When an application calls a service, the service will check the permissions of the application, and the service cannot be used if there is no corresponding permission.
When using EventHandler to implement inter-thread communication, if EventRunner takes out the Runnable task, it will trigger the callback method of EventHandler and the processing method of EventHandler.
Static animation has a start state, an end state and an intermediate state, if you need to set the transition state and transition effect in the middle, you can use static animation to achieve it.
HarmonyOS maintains a stack of AbilitySlice instances for each Page, and each AbilityS1ice instance that enters the foreground will be added to the stack.
When a developer has multiple versions of the object-relational mapping database, and the developer calls the BookStoreUpgrade class to upgrade the database version, the version number of the BookStoreUpgrade class is configured as "2", and the actual version number of the current BookStore.db is "1".
If a developer wants to develop a file background download function, there needs to be a Page Ability to provide U pages, and a Service Ability to provide the background file download function. If you want to perform some operations after connecting to the Service Ability in the Page Ability, you need to implement the onAbilityConnectDone() method in the Page Ability.
When developing the list component in the JavaScript UI framework, you can use the data of the Map type to dynamically bind the data.