# FirstStart **Repository Path**: zhedw/FirstStart ## Basic Information - **Project Name**: FirstStart - **Description**: 基于自定义弹框、首选项和页面路由实现一个模拟应用首次启动的案例。 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 7 - **Created**: 2025-05-07 - **Last Updated**: 2025-05-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # First Start ### Introduction This codelab simulates the first launch of an app based on the custom dialog, preferences, and page router. ![](screenshots/device/first_start_en.gif) ### Concepts - Preferences: allows an application to process key-value (KV) data, including querying, modifying, and persisting the data. The key is a string, and the value can be a number, a string, a Boolean value, or an array of them. - Custom dialog: displays a custom dialog box by using the CustomDialogController class. - Page router: allows an application to access pages through URLs, especially like navigating to a specified page in an app, replacing the current page with another one in an app, and returning to the previous page or a specified page. ### Permissions N/A ### How to Use 1. When you open the app for the first time, the privacy agreement dialog box is displayed. 2. When you open the app for the first time, touch the privacy agreement link to access the privacy agreement page. 3. When you open the app for the first time, the privacy agreement dialog box is displayed. Touch Disagree to exit the app. 4. When you open the app for the first time, the privacy agreement dialog box is displayed. Tap Agree and wait for 3 seconds before being redirected to the ad page. 5. The ad page is displayed for 2 seconds before being redirected to the app home page. 6. On the ad page, tap Skip in the upper right corner to redirect to the app home page. ### Constraints 1. The sample is only supported on Huawei phones with standard systems. 2. HarmonyOS: HarmonyOS 5.0.0 Release or later. 3. DevEco Studio: DevEco Studio 5.0.0 Release or later. 4. HarmonyOS SDK: HarmonyOS 5.0.0 Release SDK or later.