An engineer uses a simulator to debug a HarmonyOS application, which can support two types of HAP: signed and unsigned HAP (Harmomy0S Ability Package).
Components can neither be displayed nor interact with when they are not added to a layout, so a user interface contains at least one layout.
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.
An engineer uses the WLAN P2P function, and the engineer can establish a P2P group.
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.
When MainAbility and MainAbilitySlice are bound together, the lifecycles of the two are synchronized, including the callback method for transitioning between states.
When using EventHandler to implement inter-thread communication, if EventRunner takes out the InnerEvent event, EventRunner will directly process the event on the new thread.
When developing HarmonyOS applications, if the client and server need to communicate across processes, you can use idl to define programming interfaces that are recognized by both.
The MainAbility of a HarmonyOS application has multiple AbilitySlices, and when the AbilitySlice health state is switched, the MainAbility state is INACTIVE.
A Page Ability (hereinafter referred to as a "Page") may consist of one or more AbilitySlice, which refers to the sum of a single page of an application and its controllogic.
When an Intent is used to initiate a request, if both BundleName and Abilitylame are specified, the application can be started directly according to the full name of the Ability (for example, "com.demcapp.FooAbility").
When a developer compiles a project, the compilation fails, and the message "This device type does not match project profile" is displayed, because the device type configured in "config.json" does not match the device type for debugging, and "deviceType" needs to be configured in the "module" tag.
When MainAbility and MainAbiitySlice are bound together, the lifecycles of the two are synchronized, including the callback method for transitioning between states.
In HarmonyOS's "1+8+N" strategy, mobile phones belong to one of the "8" devices.
HarmonyOS provides the NFC message notification function, through which developers can obtain the message of the NFC switch state change and the NFC field strength message.