According to the official data, HarmonyOS 2 adds new 5 samples this week, including the JsFACard example function, the JsRouter example, the NativeImage example, the JsTimer example, and the JsDevice example.
Sample1: Update the JsFACard sample function
Scenario: This example shows the service card function, through which important information of the user application is displayed on the desktop. This time, the function of using cards through shortcut gestures has been added to achieve the purpose of direct service and reducing hierarchical jumps.
●Download link:
https://gitee.com/openharmony/app_samples/tree/master/UI/JsFACard
Sample 2: New JsRouter sample
Scenario: This example shows that by clicking on the text content, the current page jumps to the specified page. The router interface is used to realize the page jump capability and the transfer of parameters during the page jump process.
●Download link:
https://gitee.com/openharmony/app_samples/tree/master/UI/JsRouter
Sample 3: New NativeImage sample
Scenario: This example shows how to declare the JNI interface and lock and access or unlock pixel data functions through the JNI interface, and provide access to pixel data and pixel map information through Native_image.
●Download link:
https://gitee.com/openharmony/app_samples/tree/master/native/NativeImage
Sample 4: New JsTimer sample
Scenario: In this example, the system time is set through the systemTime interface, and the timer is set through the setTimeout () function.
●Download link:
https://gitee.com/openharmony/app_samples/tree/master/UI/JsTimer
Sample 5: New JsDevice sample
Scenario: This example uses the deviceInfo, systemParameter and batteryInfo interfaces to query device information, system attributes, and battery and charging attributes respectively.
●Download link:
https://gitee.com/openharmony/app_samples/tree/master/UI/JsDevice
There are 25 more Samples integrated into DevEco Studio this week, as shown in the following table:
(Via)