1# app_samples部件<a name="ZH-CN_TOPIC_0000001115464207"></a> 2 3## 简介<a name="section1470103520301"></a> 4 5为帮助开发者快速熟悉OpenHarmony SDK所提供的API和应用开发流程,我们提供了一系列的应用示例,即Sample。每一个应用示例都是一个独立的DevEco Studio工程项目,开发者可以将工程导入到DevEco Studio开发工具,通过浏览代码、编译工程、安装和运行应用示例来了解应用示例中涉及API的使用方法。 6 7**编码规范** 8 9<!-- 10 11【示例贡献温馨提示】感谢您关注OpenHarmony,如果您希望提交代码样例/示例/Demo,请参考知识体系的[《如何共建开发样例》](https://gitee.com/openharmony-sig/knowledge/blob/master/docs/co-construct_demos/README_zh.md),首先提交到SIG(兴趣组)仓,知识体系SIG仓中的提交也是有效贡献。再次感谢您的关注!) 12 13--> 14 15<table width="990" border="0" cellpadding="0" cellspacing="0" style='border-collapse:collapse;table-layout:fixed;'> 16 <tr height="18" style='height:13.50pt;'> 17 <td width="330"><a href="CodeCommitChecklist.md#社区共建Sample合入要求" target="_blank">社区共建Sample合入要求</a></td> 18 <td width="330"><a href="CodeCommitChecklist.md#代码规范" target="_blank">代码规范</a></td> 19 <td width="330"><a href="CodeCommitChecklist.md#readme编写规范" target="_blank">README编写规范</a></td> 20 </tr> 21 <tr height="18" style='height:13.50pt;'> 22 <td width="330"><a href="CodeCommitChecklist.md#ui自动化用例编写规范" target="_blank">UI自动化用例编写规范</a></td> 23 <td width="330"><a href="CodeCommitChecklist.md#工程结构规范" target="_blank">工程结构规范</a></td> 24 <td width="330"><a href="CodeCommitChecklist.md#pr提交格式规范" target="_blank">PR提交格式规范</a></td> 25 </tr> 26</table> 27 28**架构组成** 29 30<table width="990" border="0" cellpadding="0" cellspacing="0" style='border-collapse:collapse;table-layout:fixed;'> 31 <tr height="18" style='height:13.50pt;'> 32 <td width="140" x:str><strong>一级分类</strong></td> 33 <td width="170" x:str><strong>子分类</strong></td> 34 <td width="680" colspan="4" align="center" x:str><strong>应用示例</strong></td> 35 </tr> 36 <tr height="18" style='height:13.50pt;'> 37 <td width="140" align="center" rowspan="5" style='height:27.00pt' x:str><strong>UI</strong></td> 38 <td rowspan="5" x:str><strong>声明式开发范式</strong></td> 39 <td width="170" x:str><a href="code/UI/ArkTsComponentCollection/ComponentCollection">ArkTS组件集(API 12)</a></td> 40 <td width="170" x:str><a href="code/UI/CalendarViewSwitch">日历视图切换</a></td> 41 <td width="170" x:str><a href="code/UI/CitySearch">城市选择案例</a></td> 42 <td width="170" x:str><a href="code/UI/CustomAnimationTab">自定义动效tab</a></td> 43 </tr> 44 <tr height="18" style='height:13.50pt;'> 45<td width="170" x:str><a href="code/UI/DragAndExchange">Grid和List内拖拽交换子组件位置</a></td> 46<td width="170" x:str><a href="code/UI/ExpandTitle">标题下拉缩放案例</a></td> 47<td width="170" x:str><a href="code/UI/FoldableAdaptation">Navigation实现折叠屏适配案例</a></td> 48<td width="170" x:str><a href="code/UI/ImageViewer">多图片预览效果实现</a></td> 49 </tr> 50 <tr height="18" style='height:13.50pt;'> 51 <td width="170" x:str><a href="code/UI/Immersive">沉浸式适配案例</a></td> 52 <td width="170" x:str><a href="code/UI/ImperativeDynamicLayouts">FrameNode扩展实现动态布局类框架</a></td> 53 <td width="170" x:str><a href="code/UI/KeyboardAvoid">组件随软键盘弹出避让</a></td> 54 <td width="170" x:str><a href="code/UI/ListBeExchange">列表项交换案例</a></td> 55 </tr> 56 <tr height="18" style='height:13.50pt;'> 57 <td width="170" x:str><a href="code/UI/PageLoading">页面加载效果实现案例</a></td> 58 <td width="170" x:str><a href="code/UI/PullToRefresh">下拉刷新与上滑加载案例</a></td> 59 <td width="170" x:str><a href="code/UI/SearchComponent">搜索功能实现案例</a></td> 60 <td width="170" x:str><a href="code/UI/TabContentTouchHotZone">Progress触摸热区增大案例</a></td> 61 </tr> 62 <tr height="18" style='height:13.50pt;'> 63 <td width="170" x:str><a href="code/UI/VerifyCode">验证码布局</a></td> 64 <td width="170" x:str><a href="code/UI/WindowStartIcon">启动页实现案例</a></td> 65 <td width="170" x:str><a href="code/UI/NdkBuildOnMultiThread">使用NDK多线程创建UI组件</a></td> 66 <td></td> 67 </tr> 68 <tr height="18" style='height:13.50pt;'> 69 <td height="270" align="center" rowspan="35" style='height:202.50pt' x:str><strong>基础特性</strong></td> 70 <td x:str><strong>能力增强</strong></td> 71 <td x:str><a href="code/BasicFeature/Ability/AbilityFeature">基础能力增强</a></td> 72 <td x:str><a href="code/BasicFeature/Ability/AbilityRuntime">基础能力增强</a></td> 73 <td x:str><a href="code/BasicFeature/Ability/AppStartup">应用启动框架startup</a></td> 74 <td x:str><a href="code/BasicFeature/Ability/UniversalLink">基础能力增强</a></td> 75 </tr> 76 <tr height="18" style='height:13.50pt;'> 77 <td x:str><strong>广告</strong></td> 78 <td x:str><a href="code/BasicFeature/Ads/OAIDSample">广告标识服务Sample</a></td> 79 <td ></td> 80 <td ></td> 81 <td ></td> 82 </tr> 83 <tr height="18" style='height:13.50pt;'> 84 <td x:str><strong>应用模型</strong></td> 85 <td x:str><a href="code/BasicFeature/ApplicationModels/AbilityStartMode">Ability的启动方式</a></td> 86 <td x:str><a href="code/BasicFeature/ApplicationModels/BundleManager/BundleManagement">支持5.0特性能力sample</a></td> 87 <td x:str><a href="code/BasicFeature/ApplicationModels/DynamicRouter">Navigation动态路由</a></td> 88 <td x:str><a href="code/BasicFeature/ApplicationModels/SystemRouter">Navigation系统路由</a></td> 89 </tr> 90 <tr height="18" style='height:13.50pt;'> 91 <td rowspan="3" x:str><strong>网络与连接</strong></td> 92 <td x:str><a href="code/BasicFeature/Connectivity/Bluetooth">蓝牙</a></td> 93 <td x:str><a href="code/BasicFeature/Connectivity/Http">Http(API 10)</a></td> 94 <td x:str><a href="code/BasicFeature/Connectivity/MultipleFilesDownload">多文件下载监听案例</a></td> 95 <td x:str><a href="code/BasicFeature/Connectivity/NetworkObserver">网络状态监听</a></td> 96 </tr> 97 <tr height="18" style='height:13.50pt;'> 98 <td x:str><a href="code/BasicFeature/Connectivity/RPC">RPC通信</a></td> 99 <td x:str><a href="code/BasicFeature/Connectivity/Socket">网络管理-Socket连接(UDP)</a></td> 100 <td x:str><a href="code/BasicFeature/Connectivity/StageSocket">Socket连接</a></td> 101 <td x:str><a href="code/BasicFeature/Connectivity/UploadAndDownLoad">上传和下载(API 12)</a></td> 102 </tr> 103 <tr height="18" style='height:13.50pt;'> 104 <td x:str><a href="code/BasicFeature/Connectivity/VPN">VPN连接</a></td> 105 <td x:str><a href="code/BasicFeature/Connectivity/WebSocket">WebSocket</a></td> 106 <td ></td> 107 <td ></td> 108 </tr> 109 <tr height="18" style='height:13.50pt;'> 110 <td rowspan="2" x:str><strong>DFX</strong></td> 111 <td x:str><a href="code/BasicFeature/DFX/Debug">Debug调试</a></td> 112 <td ><a href="code/BasicFeature/DFX/DotTest">测试打点</a></td> 113 <td ><a href="code/BasicFeature/DFX/FaultLogger">故障日志获取</a></td> 114 <td ><a href="code/BasicFeature/DFX/Logger">日志打印</a></td> 115 </tr> 116 <tr height="18" style='height:13.50pt;'> 117 <td x:str><a href="code/BasicFeature/DFX/AppRecovery">应用故障恢复(API 10)</a></td> 118 <td ></td> 119 <td ></td> 120 <td ></td> 121 </tr> 122 <tr height="18" style='height:13.50pt;'> 123 <td x:str><strong>数据管理</strong></td> 124 <td x:str><a href="code/BasicFeature/DataManagement/Preferences">首选项</a></td> 125 <td x:str><a href="code/BasicFeature/DataManagement/UDMF/UDMFDemo">UDMF Demo</a></td> 126 <td x:str><a href="code/BasicFeature/DataManagement/pasteboard">剪贴板Sample</a></td> 127 <td ></td> 128 </tr> 129 <tr height="18" style='height:13.50pt;'> 130 <td rowspan="2" x:str><strong>设备管理</strong></td> 131 <td x:str><a href="code/BasicFeature/DeviceManagement/Location">位置服务</a></td> 132 <td x:str><a href="code/BasicFeature/DeviceManagement/ScreenDetector">屏幕探测</a></td> 133 <td x:str><a href="code/BasicFeature/DeviceManagement/DeviceManagementCollection">设备管理合集(API 10)</a></td> 134 <td x:str><a href="code/BasicFeature/DeviceManagement/Vibrator/CustomHaptic">自定义振动(API 10)</a></td> 135 </tr> 136 <tr height="18" style='height:13.50pt;'> 137 <td x:str><a href="code/BasicFeature/DeviceManagement/Vibrator/BasicVibration">振动</a></td> 138 <td x:str><a href="code/BasicFeature/DeviceManagement/Sensor/Capi">传感器</a></td> 139 <td ></td> 140 <td ></td> 141 </tr> 142 <tr height="18" style='height:13.50pt;'> 143 <td rowspan="1" x:str><strong>文件管理</strong></td> 144 <td x:str><a href="code/BasicFeature/Extension/Contexttest">extension示例</a></td> 145 <td x:str><a href="code/BasicFeature/FileManagement/FileBackupExtension">应用接入数据备份恢复(API 11)</a></td> 146 <td x:str><a href="code/BasicFeature/FileManagement/FileShare/SandboxShare">文件分享与访问</a></td> 147 <td ></td> 148 </tr> 149 <tr height="18" style='height:13.50pt;'> 150 <td rowspan="2" x:str><strong>图像</strong></td> 151 <td x:str><a href="code/BasicFeature/Graphics/DisplaySoloist">DisplaySoloist分级管控</a></td> 152 <td x:str><a href="code/BasicFeature/Graphics/DisplaySync">DisplaySync分级管控</a></td> 153 <td x:str><a href="code/BasicFeature/Graphics/Graphics2d/Eraser">橡皮擦</a></td> 154 <td x:str><a href="code/BasicFeature/Graphics/Graphics2d/ExpandText">字体文本展开</a></td> 155 </tr> 156 <tr height="18" style='height:13.50pt;'> 157 <td x:str><a href="code/BasicFeature/Graphics/Graphics2d/PaintVerbatim">字体绘制</a></td> 158 <td x:str><a href="code/BasicFeature/Graphics/Graphics2d/TsDrawingSample">图形绘制与显示的示例(TSDrawingSample)</a></td> 159 <td x:str><a href="code/BasicFeature/Graphics/Graphics3d">3D引擎接口示例</a></td> 160 <td ></td> 161 </tr> 162 <tr height="18" style='height:13.50pt;'> 163 <td x:str><strong>国际化</strong></td> 164 <td x:str><a href="code/BasicFeature/International/International">国际化</a></td> 165 <td ></td> 166 <td ></td> 167 <td ></td> 168 </tr> 169<tr height="18" style='height:13.50pt;'> 170 <td rowspan="5" x:str><strong>媒体</strong></td> 171 <td x:str><a href="code/BasicFeature/Media/AVRecorder">音视频录制</a></td> 172 <td x:str><a href="code/BasicFeature/Media/AVSession/AvCastPickerForCall">通话设备切换</a></td> 173 <td x:str><a href="code/BasicFeature/Media/AVSession/MediaProvider">媒体会话——提供方(API 10)</a></td> 174 <td x:str><a href="code/BasicFeature/Media/AVSession/VideoPlayer">视频播放</a></td> 175 </tr> 176 <tr height="18" style='height:13.50pt;'> 177 <td x:str><a href="code/BasicFeature/Media/Audio">音频管理(API 12)</a></td> 178 <td x:str><a href="code/BasicFeature/Media/AudioHaptic">音振</a></td> 179 <td x:str><a href="code/BasicFeature/Media/AudioToVideoSync">实现音画同步播放效果</a></td> 180 <td x:str><a href="code/BasicFeature/Media/Camera">相机示例</a></td> 181 </tr> 182 <tr height="18" style='height:13.50pt;'> 183 <td x:str><a href="code/BasicFeature/Media/Camera_js">相机示例(JS)</a></td> 184 <td x:str><a href="code/BasicFeature/Media/CustomScan">折叠屏扫描二维码方案</a></td> 185 <td x:str><a href="code/BasicFeature/Media/Image">图片编辑(API 14)</a></td> 186 <td x:str><a href="code/BasicFeature/Media/ImageEffect">图片编辑</a></td> 187 </tr> 188 <tr height="18" style='height:13.50pt;'> 189 <td x:str><a href="code/BasicFeature/Media/ImageShow">图片显示</a></td> 190 <td x:str><a href="code/BasicFeature/Media/QRCodeScan">二维码扫描</a></td> 191 <td x:str><a href="code/BasicFeature/Media/VideoListAutoPlay">滑动视频自动播放</a></td> 192 <td x:str><a href="code/BasicFeature/Media/VideoPlay">视频播放(API 12)</a></td> 193 </tr> 194 <tr height="18" style='height:13.50pt;'> 195 <td x:str><a href="code/BasicFeature/Media/VideoShow">媒体库视频</a></td> 196 <td x:str><a href="code/BasicFeature/Media/VideoSwitching">短视频切换案例</a></td> 197 <td ></td> 198 <td ></td> 199 </tr> 200 <tr height="18" style='height:13.50pt;'> 201 <td rowspan="4" x:str><strong>Native</strong></td> 202 <td x:str><a href="code/BasicFeature/Native/ArkTSXComponent">XComponent</a></td> 203 <td x:str><a href="code/BasicFeature/Native/NdkDrawing">Native Drawing</a></td> 204 <td x:str><a href="code/BasicFeature/Native/NdkNativeImage">基于NdkNativeImage的平滑渐变动画效果</a></td> 205 <td x:str><a href="code/BasicFeature/Native/NdkNativeWindow">Native Window</a></td> 206 </tr> 207 <tr height="18" style='height:13.50pt;'> 208 <td x:str><a href="code/BasicFeature/Native/NdkNotification">Native Notification</a></td> 209 <td x:str><a href="code/BasicFeature/Native/NdkOpenGL">OpenGL三棱椎(API 10)</a></td> 210 <td x:str><a href="code/BasicFeature/Native/NdkQoS">Native QoS</a></td> 211 <td x:str><a href="code/BasicFeature/Native/NdkRawfile">获取Rawfile资源</a></td> 212 </tr> 213 <tr height="18" style='height:13.50pt;'> 214 <td x:str><a href="code/BasicFeature/Native/NdkRenderNodeDrawing">Native RenderNode Drawing</a></td> 215 <td x:str><a href="code/BasicFeature/Native/NdkTsDrawing">NdkTsDrawing</a></td> 216 <td x:str><a href="code/BasicFeature/Native/NdkVulkan">XComponent组件对接Vulkan</a></td> 217 <td x:str><a href="code/BasicFeature/Native/NdkXComponent">Native XComponent(API 10)</a></td> 218 </tr> 219 <tr height="18" style='height:13.50pt;'> 220 <td x:str><a href="code/BasicFeature/Native/XComponent">XComponent</a></td> 221 <td x:str><a href="code/BasicFeature/Native/XComponent3D">XComponent3D</a></td> 222 <td ></td> 223 <td ></td> 224 </tr> 225 <tr height="18" style='height:13.50pt;'> 226 <td rowspan="2" x:str><strong>通知</strong></td> 227 <td x:str><a href="code/BasicFeature/Notification/CustomCommonEvent">公共事件的订阅和发布(API 11)</a></td> 228 <td x:str><a href="code/BasicFeature/Notification/CustomCommonEventRely">自定义Emitter</a></td> 229 <td x:str><a href="code/BasicFeature/Notification/CustomEmitter">自定义Emitter</a></td> 230 <td x:str><a href="code/BasicFeature/Notification/CustomNotification">自定义通知(API 10)</a></td> 231 </tr> 232 <tr height="18" style='height:13.50pt;'> 233 <td x:str><a href="code/BasicFeature/Notification/CustomNotificationBadge">自定义通知角标(API 10)</a></td> 234 <td ></td> 235 <td ></td> 236 <td ></td> 237 </tr> 238 <tr height="18" style='height:13.50pt;'> 239 <td x:str><strong>打印</strong></td> 240 <td x:str><a href="code/BasicFeature/Print/ScanNapiInterfaceDemo">扫描仪应用demo</a></td> 241 <td ></td> 242 <td ></td> 243 <td ></td> 244 </tr> 245 <tr height="18" style='height:13.50pt;'> 246 <td x:str><strong>资源</strong></td> 247 <td x:str><a href="code/BasicFeature/Resource/ResourceManager">资源管理(API 10)</a></td> 248 <td ></td> 249 <td ></td> 250 <td ></td> 251 </tr> 252 <tr height="18" style='height:13.50pt;'> 253 <td rowspan="2"><strong>安全</strong></td> 254 <td x:str><a href="code/BasicFeature/Security/AppAccountManager">应用帐号管理</a></td> 255 <td x:str><a href="code/BasicFeature/Security/Asset">关键资产存储</a></td> 256 <td x:str><a href="code/BasicFeature/Security/CertManager">证书管理</a></td> 257 <td x:str><a href="code/BasicFeature/Security/Cipher">加解密</a></td> 258 </tr> 259 <tr height="18" style='height:13.50pt;'> 260 <td x:str><a href="code/BasicFeature/Security/CryptoFramework">通用密钥库系统(cryptoFramework)</a></td> 261 <td x:str><a href="code/BasicFeature/Security/Huks">通用密钥库系统(huks)(API 10)</a></td> 262 <td x:str><a href="code/BasicFeature/Security/PaySecurely">支付</a></td> 263 <td ></td> 264 </tr> 265 <tr height="18" style='height:13.50pt;'> 266 <td x:str><strong>任务管理</strong></td> 267 <td x:str><a href="code/BasicFeature/TaskManagement/ContinuousTask">长时任务</a></td> 268 <td x:str><a href="code/BasicFeature/TaskManagement/ReminderAgentManager">后台代理提醒</a></td> 269 <td ></td> 270 <td ></td> 271 </tr> 272 <tr height="18" style='height:13.50pt;'> 273 <td rowspan="2" x:str><strong>电话服务</strong></td> 274 <td x:str><a href="code/BasicFeature/Telephony/Contact">联系人</a></td> 275 <td x:str><a href="code/BasicFeature/Telephony/MobileNetwork">蜂窝数据</a></td> 276 <td x:str><a href="code/BasicFeature/Telephony/Observer">网络和Sim卡状态订阅</a></td> 277 <td x:str><a href="code/BasicFeature/Telephony/RadioTech">网络搜索</a></td> 278 </tr> 279 <tr height="18" style='height:13.50pt;'> 280 <td x:str><a href="code/BasicFeature/Telephony/SimManager">SIM卡管理</a></td> 281 <td ></td> 282 <td ></td> 283 <td ></td> 284 </tr> 285 <tr height="18" style='height:13.50pt;'> 286 <td x:str><strong>Web</strong></td> 287 <td x:str><a href="code/BasicFeature/Web/Browser">浏览器</a></td> 288 <td x:str><a href="code/BasicFeature/Web/RunJsInWeb">JS注入与执行</a></td> 289 <td ></td> 290 <td ></td> 291 </tr> 292 <tr height="18" style='height:13.50pt;'> 293 <td x:str><strong>窗口</strong></td> 294 <td x:str><a href="code/BasicFeature/Window/MediaFullScreen">视频全屏切换案例</a></td> 295 <td ></td> 296 <td ></td> 297 </tr> 298 <tr height="18" style='height:13.50pt;'> 299<td height="90" align="center" rowspan="26" style='height:67.50pt;' x:str><strong>系统特性(仅对系统应用开放)</strong></td> 300 <td x:str><strong>能力增强</strong></td> 301 <td x:str><a href="code/SystemFeature/Ability/AbilityFeatureSystem">基础能力增强</a></td> 302 <td ></td> 303 <td ></td> 304 <td ></td> 305 </tr> 306 <tr height="18" style='height:13.50pt;'> 307 <td rowspan="3" x:str><strong>应用模型</strong></td> 308 <td x:str><a href="code/SystemFeature/ApplicationModels/CustomShare">自定义分享(API 10)</a></td> 309 <td x:str><a href="code/SystemFeature/ApplicationModels/EmbeddedUIExtensionAbility">EmbeddedUIExtensionAbility</a></td> 310 <td x:str><a href="code/SystemFeature/ApplicationModels/EnterpriseAdminExtensionAbility">企业设备管理扩展</a></td> 311 <td x:str><a href="code/SystemFeature/ApplicationModels/UIExtensionAbility">UIExtensionAbility</a></td> 312 </tr> 313 <tr height="18" style='height:13.50pt;'> 314 <td x:str><a href="code/SystemFeature/ApplicationModels/Launcher">仿桌面应用(API 10)</a></td> 315 <td x:str><a href="code/SystemFeature/ApplicationModels/MissionManager">任务管理</a></td> 316 <td x:str><a href="code/SystemFeature/ApplicationModels/StageModel">Stage模型(API10)</a></td> 317 <td x:str><a href="code/SystemFeature/ApplicationModels/StaticSubscriber">静态订阅(API 10)</a></td> 318 </tr> 319 <tr height="18" style='height:13.50pt;'> 320 <td x:str><a href="code/SystemFeature/ApplicationModels/TestRely/LauncherTest/CrossChainBack">跨任务链返回</a></td> 321 <td x:str><a href="code/SystemFeature/ApplicationModels/TestRely/LauncherTest/StartRecentAbility">启动上一次的组件实例</a></td> 322 <td ></td> 323 <td ></td> 324 </tr> 325 <tr height="18" style='height:13.50pt;'> 326 <td x:str><strong>自动填充</strong></td> 327 <td x:str><a href="code/SystemFeature/AutoFill/AutoFill">AutoFill自动填充能力</a></td> 328 <td x:str><a href="code/SystemFeature/AutoFill/AutoFillScenarioization">情景化自动填充能力</a></td> 329 <td ></td> 330 <td ></td> 331 </tr> 332 <tr height="18" style='height:13.50pt;'> 333 <td x:str><strong>网络与连接</strong></td> 334 <td x:str><a href="code/SystemFeature/Connectivity/Wlan">WLAN</a></td> 335 <td x:str><a href="code/SystemFeature/Connectivity/Bluetooth">蓝牙</a></td> 336 <td ></td> 337 <td ></td> 338 </tr> 339 <tr height="18" style='height:13.50pt;'> 340 <td x:str><strong>数据管理</strong></td> 341 <td x:str><a href="code/SystemFeature/DataManagement/CrossAppDataShare">跨应用数据共享</a></td> 342 <td ></td> 343 <td ></td> 344 <td ></td> 345 </tr> 346 <tr height="18" style='height:13.50pt;'> 347 <td x:str><strong>设备管理</strong></td> 348 <td x:str><a href="code/SystemFeature/DeviceManagement/DeviceManagementCollection">设备管理合集(API 11)</a></td> 349 <td x:str><a href="code/SystemFeature/DeviceManagement/Mouse">鼠标外设(API 10)</a></td> 350 <td x:str><a href="code/SystemFeature/DeviceManagement/Screen">屏幕属性(API 10)</a></td> 351 <td x:str><a href="code/SystemFeature/DeviceManagement/StorageStatistic">存储空间统计(API 10)</a></td> 352 </tr> 353 <tr height="18" style='height:13.50pt;'> 354 <td x:str><strong>设备信息统计</strong></td> 355 <td x:str><a href="code/SystemFeature/DeviceUsageStatistics/DeviceUsageStatistics">设备使用信息统计</a></td> 356 <td ></td> 357 <td ></td> 358 <td ></td> 359 </tr> 360 <tr height="18" style='height:13.50pt;'> 361 <td x:str><strong>分布式</strong></td> 362 <td x:str><a href="code/SystemFeature/DistributedAppDev/DistributedAccount">分布式帐号(API 10)</a></td> 363 <td x:str><a href="code/SystemFeature/DistributedAppDev/DistributedAuthentication">分布式组网认证(API 10)</a></td> 364 <td ></td> 365 <td ></td> 366 </tr> 367 <tr height="18" style='height:13.50pt;'> 368 <td x:str><strong>文件管理</strong></td> 369 <td x:str><a href="code/SystemFeature/FileManagement/FileManager">文件管理(API 11)</a></td> 370 <td x:str><a href="code/SystemFeature/FileManagement/FileShare/Picker">选择并查看文档与媒体文件(API 10)</a></td> 371 <td x:str><a href="code/SystemFeature/FileManagement/MediaCollections">媒体管理合集</a></td> 372 <td x:str><a href="code/SystemFeature/FileManagement/Photos">相册(API 12)</a></td> 373 </tr> 374 <tr height="18" style='height:13.50pt;'> 375 <td x:str><strong>全屏启动原子化服务</strong></td> 376 <td x:str><a href="code/SystemFeature/FullScreenStart/FullScreenStart">全屏启动原子化服务</a></td> 377 <td x:str><a href="code/SystemFeature/FullScreenStart/FullScreenStart_Service">原子化服务</a></td> 378 <td ></td> 379 <td ></td> 380 </tr> 381 <tr height="18" style='height:13.50pt;'> 382 <td x:str><strong>IDL</strong></td> 383 <td x:str><a href="code/SystemFeature/IDL/AbilityConnectServiceExtension">Ability与ServiceExtensionAbility通信</a></td> 384 <td x:str></td> 385 <td x:str></td> 386 <td x:str></td> 387 </tr> 388 <tr height="18" style='height:13.50pt;'> 389 <td x:str><strong>国际化</strong></td> 390 <td x:str><a href="code/SystemFeature/Internationalnation/International">时区和语言设置(API 10)</a></td> 391 <td ></td> 392 <td ></td> 393 <td ></td> 394 </tr> 395 <tr height="18" style='height:13.50pt;'> 396 <td rowspan="3" x:str><strong>媒体</strong></td> 397 <td x:str><a href="code/SystemFeature/Media/AVSession/MediaController">媒体会话——控制方(API 10)</a></td> 398 <td x:str><a href="code/SystemFeature/Media/Audio">音频管理(仅对系统应用开放)</a></td> 399 <td x:str><a href="code/SystemFeature/Media/Camera">相机和媒体库(API 10)</a></td> 400 <td x:str><a href="code/SystemFeature/Media/GamePuzzle">图片裁剪与分割</a></td> 401 </tr> 402 <tr height="18" style='height:13.50pt;'> 403 <td x:str><a href="code/SystemFeature/Media/MusicPlayer">折叠屏音乐播放器案例</a></td> 404 <td x:str><a href="code/SystemFeature/Media/Recorder">录音机</a></td> 405 <td x:str><a href="code/SystemFeature/Media/ScreenRecorder">录屏</a></td> 406 <td x:str><a href="code/SystemFeature/Media/Screenshot">截屏</a></td> 407 </tr> 408 <tr height="18" style='height:13.50pt;'> 409 <td x:str><a href="code/SystemFeature/Media/VoiceCallDemo">音频通话示例(API 10)</a></td> 410 <td ></td> 411 <td ></td> 412 <td ></td> 413 </tr> 414 <tr height="18" style='height:13.50pt;'> 415 <td x:str><strong>通知</strong></td> 416 <td x:str><a href="code/SystemFeature/Notification/CustomNotificationPush">自定义通知推送(API 10)</a></td> 417 <td x:str><a href="code/SystemFeature/Notification/Publish">实况通知推送</a></td> 418 <td x:str><a href="code/SystemFeature/Notification/Subscribe">通知发布订阅</a></td> 419 <td ></td> 420 </tr> 421 <tr height="18" style='height:13.50pt;'> 422 <td x:str><strong>资源配置</strong></td> 423 <td x:str><a href="code/SystemFeature/ResourceAllocation/ApplicationThemeSwitch">应用主题切换</a></td> 424 <td ></td> 425 <td ></td> 426 <td ></td> 427 </tr> 428 <tr height="18" style='height:13.50pt;'> 429 <td rowspan="2" x:str><strong>安全</strong></td> 430 <td x:str><a href="code/SystemFeature/Security/AbilityAccessCtrl">应用访问权限控制</a></td> 431 <td x:str><a href="code/SystemFeature/Security/AuthorizedButton">安全控件类型的UI控件(API 10)</a></td> 432 <td x:str><a href="code/SystemFeature/Security/CertificateFramework">证书算法库框架</a></td> 433 <td x:str><a href="code/SystemFeature/Security/DLP">DLP</a></td> 434 </tr> 435 <tr height="18" style='height:13.50pt;'> 436 <td x:str><a href="code/SystemFeature/Security/DLPManager">DLPManager</a></td> 437 <td ></td> 438 <td ></td> 439 <td ></td> 440 </tr> 441 <tr height="18" style='height:13.50pt;'> 442 <td x:str><strong>任务管理</strong></td> 443 <td x:str><a href="code/SystemFeature/TaskManagement/Flybird">小鸟避障游戏</a></td> 444 <td x:str><a href="code/SystemFeature/TaskManagement/TransientTask">短时任务</a></td> 445 <td x:str><a href="code/SystemFeature/TaskManagement/WorkScheduler">延迟任务调度</a></td> 446 <td ></td> 447 </tr> 448 <tr height="18" style='height:13.50pt;'> 449 <td x:str><strong>电话服务</strong></td> 450 <td x:str><a href="code/SystemFeature/Telephony/Message">短信</a></td> 451 <td x:str><a href="code/SystemFeature/Telephony/Call">拨打电话</a></td> 452 <td ></td> 453 </tr> 454<tr height="18" style='height:13.50pt;'> 455 <td x:str><strong>基础能力增强</strong></td> 456 <td x:str><a href="code/SystemFeature/UIExtensionSamples">基础能力增强</a></td> 457 <td ></td> 458 <td ></td> 459 <td ></td> 460 </tr> 461 <tr height="18" style='height:13.50pt;'> 462 <td x:str><strong>卡片</strong></td> 463 <td x:str><a href="code/SystemFeature/Widget/FormExtAbility">Stage模型卡片</a></td> 464 <td x:str><a href="code/SystemFeature/Widget/RequestAddForm">应用主动添加数据代理卡片到桌面</a></td> 465 <td ></td> 466 <td ></td> 467 </tr> 468 <tr height="18" style='height:13.50pt;'> 469 <td x:str><strong>窗口管理</strong></td> 470 <td x:str><a href="code/SystemFeature/WindowManagement/WindowExtAbility">窗口扩展</a></td> 471 <td x:str><a href="code/SystemFeature/WindowManagement/WindowManage">窗口管理(API 12)</a></td> 472 <td x:str><a href="code/SystemFeature/WindowManagement/WindowRatio">悬浮窗(API 10)</a></td> 473 <td ></td> 474 </tr> 475 <td height="90" align="center" rowspan="9" style='height:67.50pt;' x:str><strong>关键特性</strong></td> 476 <tr height="18" style='height:13.50pt;'> 477 <td rowspan="3" x:str><strong>分布式</strong></td> 478 <td x:str><a href="code/SuperFeature/DistributedAppDev/ArkTSDistributedCalc">分布式计算器(API 14)</a></td> 479 <td x:str><a href="code/SuperFeature/DistributedAppDev/ArkTSDistributedMusicPlayer">ArkTS分布式音乐播放</a></td> 480 <td x:str><a href="code/SuperFeature/DistributedAppDev/DistributeCalc">JS分布式计算器(API 10)</a></td> 481 <td x:str><a href="code/SuperFeature/DistributedAppDev/DistributedFilemanager">分布式文件管理</a></td> 482 </tr> 483 <tr height="18" style='height:13.50pt;'> 484 <td x:str><a href="code/SuperFeature/DistributedAppDev/DistributedJotNote">跨端迁移随手记</a></td> 485 <td x:str><a href="code/SuperFeature/DistributedAppDev/DistributedNote">分布式对象(API 10)</a></td> 486 <td x:str><a href="code/SuperFeature/DistributedAppDev/JsDistributedMusicPlayer">JS分布式音乐播放(API 10)</a></td> 487 <td x:str><a href="code/SuperFeature/DistributedAppDev/DistributedRdb">分布式关系型数据库(API 10)</a></td> 488 </tr> 489 <tr height="18" style='height:13.50pt;'> 490 <td x:str><a href="code/SuperFeature/DistributedAppDev/Kvstore">分布式数据管理</a></td> 491 <td ></td> 492 <td ></td> 493 <td ></td> 494 </tr> 495 <td rowspan="3" x:str><strong>一次开发,多端部署</strong></td> 496 <td x:str><a href="code/SuperFeature/MultiDeviceAppDev/AdaptiveCapabilities">ArkTS一多能力集合(API 10)</a></td> 497 <td x:str><a href="code/SuperFeature/MultiDeviceAppDev/AppMarket">典型页面场景:应用市场首页</a></td> 498 <td x:str><a href="code/SuperFeature/MultiDeviceAppDev/HealthyDiet">典型页面场景:健康饮食</a></td> 499 <td x:str><a href="code/SuperFeature/MultiDeviceAppDev/JsAdaptiveCapabilities">JS一多能力集合</a></td> 500 </tr> 501 <tr height="18" style='height:13.50pt;'> 502 <td x:str><a href="code/SuperFeature/MultiDeviceAppDev/MultiColumns">典型页面场景:一多分栏控件(API 10)</a></td> 503 <td x:str><a href="code/SuperFeature/MultiDeviceAppDev/MultiMusic">典型页面场景:一多音乐典型场景</a></td> 504 <td x:str><a href="code/SuperFeature/MultiDeviceAppDev/MultiNavBar">典型页面场景:一多导航栏(API 10)</a></td> 505 <td x:str><a href="code/SuperFeature/MultiDeviceAppDev/MusicAlbum">典型页面场景:音乐专辑页</a></td> 506 </tr> 507 <tr height="18" style='height:13.50pt;'> 508 <td x:str><a href="code/SuperFeature/MultiDeviceAppDev/Settings">典型页面场景:设置应用页面</a></td> 509 <td x:str><a href="code/SuperFeature/MultiDeviceAppDev/Weather">入门示例:天气应用</a></td> 510 <td ></td> 511 <td ></td> 512 </tr> 513 <tr height="18" style='height:13.50pt;'> 514 <td rowspan="2" x:str><strong>卡片</strong></td> 515 <td x:str><a href="code/SuperFeature/Widget/AdaptiveServiceWidget">JS多设备自适应服务卡片</a></td> 516 <td x:str><a href="code/SuperFeature/Widget/ArkTSCard/Calculator">ArkTS卡片计算器</a></td> 517 <td x:str><a href="code/SuperFeature/Widget/ArkTSCard/CanvasGame">ArkTS卡片Canvas小游戏</a></td> 518 <td x:str><a href="code/SuperFeature/Widget/ArkTSCard/MusicControl">ArkTs音乐卡片</a></td> 519 </tr> 520 <tr height="18" style='height:13.50pt;'> 521 <td x:str><a href="code/SuperFeature/Widget/FormGame">Stage模型卡片JS与C++通信(API 10)</a></td> 522 <td ></td> 523 <td ></td> 524 <td ></td> 525 </tr> 526 <td height="90" align="center" rowspan="8" style='height:67.50pt' x:str><strong>行业解决方案</strong></td> 527 <tr height="18" style='height:13.50pt;'> 528 <td x:str><strong>游戏</strong></td> 529 <td x:str><a href="code/Solutions/Game/DistributedDataGobang">分布式五子棋</a></td> 530 <td x:str><a href="code/Solutions/Game/Game2048">游戏2048</a></td> 531 <td x:str><a href="code/Solutions/Game/Lottie">Lottie</a></td> 532 <td ></td> 533 </tr> 534 <td x:str><strong>即时通信</strong></td> 535 <td x:str><a href="code/Solutions/IM/Chat">聊天实例应用(API 10)</a></td> 536 <td ></td> 537 <td ></td> 538 <td ></td> 539 </tr> 540 <tr height="18" style='height:13.50pt;'> 541 <td x:str><strong>输入法</strong></td> 542 <td x:str><a href="code/Solutions/InputMethod/CustomInputText">自绘编辑框(API 10)</a></td> 543 <td x:str><a href="code/Solutions/InputMethod/KikaInput">轻量级输入法(API 10)</a></td> 544 <td x:str><a href="code/Solutions/InputMethod/KikaInputMethod">Kika输入法应用(API 10)</a></td> 545 <td ></td> 546 </tr> 547 <tr height="18" style='height:13.50pt;'> 548 <td x:str><strong>媒体</strong></td> 549 <td x:str><a href="code/Solutions/Media/MultiMedia">仿相机</a></td> 550 <td ></td> 551 <td ></td> 552 <td ></td> 553 </tr> 554 <tr height="18" style='height:13.50pt;'> 555 <td x:str><strong>电商</strong></td> 556 <td x:str><a href="code/Solutions/Shopping/OrangeShopping">购物示例应用</a></td> 557 <td ></td> 558 <td ></td> 559 <td ></td> 560 </tr> 561<tr height="18" style='height:13.50pt;'> 562 <td x:str><strong>社交</strong></td> 563 <td x:str><a href="code/Solutions/Social/GrapeSquare">葡萄广场</a></td> 564 <td ></td> 565 <td ></td> 566 <td ></td> 567 </tr> 568 <tr height="18" style='height:13.50pt;'> 569 <td x:str><strong>工具</strong></td> 570 <td x:str><a href="code/Solutions/Tools/ArkTSClock">ArkTS时钟</a></td> 571 <td x:str><a href="code/Solutions/Tools/FlipClock">翻页时钟</a></td> 572 <td x:str><a href="code/Solutions/Tools/JsClock">JS时钟(API 10)</a></td> 573 <td x:str><a href="code/Solutions/Tools/PatternLock">图案密码锁</a></td> 574 </tr> 575 <tr height="18" style='height:13.50pt;'> 576 <td height="54" align="center" rowspan="3" style='height:40.50pt' x:str><strong>工程能力</strong></td> 577 <td x:str><strong>应用程序包</strong></td> 578 <td x:str><a href="code/Project/ApplicationHap/MultiHap">多HAP</a></td> 579 <td ></td> 580 <td ></td> 581 <td ></td> 582 </tr> 583 <tr height="18" style='height:13.50pt;'> 584 <td x:str><strong>HapBuild</strong></td> 585 <td x:str><a href="code/Project/HapBuild">流水线预测试工具</a></td> 586 <td ></td> 587 <td ></td> 588 <td ></td> 589 </tr> 590 <tr height="18" style='height:13.50pt;'> 591 <td x:str><strong>Test</strong></td> 592 <td x:str><a href="code/Project/Test">测试框架</a></td> 593 <td ></td> 594 <td ></td> 595 <td ></td> 596 </tr> 597 <tr height="18" style='height:13.50pt;'> 598 <td rowspan="1" align="center" x:str><strong>语言基础类库</strong></td> 599 <td rowspan="1" x:str><strong>语言基础类库</strong></td> 600 <td x:str><a href="code/LanguageBaseClassLibrary/ConcurrentModule">多线程任务</a></td> 601 <td x:str><a href="code/LanguageBaseClassLibrary/LanguageBaseClassLibrary">语言基础类库(API 10)</a></td> 602 <td x:str><a href="code/LanguageBaseClassLibrary/ZipLib">压缩与解压</a></td> 603 <td ></td> 604 </tr> 605 <tr height="18" style='height:13.50pt;'> 606 <td rowspan="2" align="center" x:str><strong>性能</strong></td> 607 <td rowspan="1" x:str><strong>方舟运行时</strong></td> 608 <td x:str><a href="code/Performance/ArkRuntime/NBody"> N-Body模拟程序(API 10)</a></td> 609 <td x:str><a href="code/Performance/OperateRDBInTaskPool">在TaskPool线程中操作关系型数据库实现案例</a></td> 610 <td ></td> 611 <td ></td> 612 </tr> 613 <tr height="18" style='height:13.50pt;'> 614 <td rowspan="1" x:str><strong>性能提升</strong></td> 615 <td x:str><a href="code/Performance/PerformanceLibrary"> 性能示例 </a></td> 616 <td x:str><a href="code/Performance/renderGroup"> 性能示例(renderGroup 接口)</a></td> 617 <td ></td> 618 <td ></td> 619 </tr> 620 <tr> 621<![if supportMisalignedColumns]> 622 <tr height="18" style="display:none;"> 623 </tr> 624 <![endif]> 625</table> 626 627## 目录<a name="sectionMenu"></a> 628 629Sample仓下所展示的组件能力: 630 631``` 632code 633|---UI # UI开发 634 |---ArkTsComponentCollection # ArkTs组件集 635 |---CalendarViewSwitch # 日历视图切换 636 |---CitySearch # 城市选择案例 637 |---CustomAnimationTab # 自定义动效tab 638 |---DragAndExchange # Grid和List内拖拽交换子组件位置 639 |---ExpandTitle # 标题下拉缩放案例 640 |---FoldableAdaptation # Navigation实现折叠屏适配案例 641 |---ImageViewer # 多图片预览效果实现 642 |---Immersive # 沉浸式适配案例 643 |---ImperativeDynamicLayouts # 动态布局类框架 644 |---KeyboardAvoid # 组件随软键盘弹出避让 645 |---ListBeExchange # 列表项交换案例 646 |---PageLoading # 页面加载效果实现案例 647 |---PullToRefresh # 下拉刷新与上滑加载案例 648 |---SearchComponent # 搜索功能实现案例 649 |---TabContentTouchHotZone # 触摸热区增大案例 650 |---VerifyCode # 验证码布局 651 |---WindowStartIcon # 启动页实现案例 652|---BasicFeature # 基础特性 653 |---Ability # 能力增强 654 |---Ads # 广告 655 |---ApplicationModels # 应用模型 656 |---Connectivity # 网络与连接 657 |---DFX # DFX 658 |---DataManagement # 数据管理 659 |---DeviceManagement # 设备管理 660 |---Extension # Extension 661 |---FileManagement # 文件管理 662 |---Graphics # 图像 663 |---International # 国际化 664 |---Media # 媒体 665 |---Native # Native c++ 666 |---Notification # 通知 667 |---Print # 打印 668 |---Resource # 资源 669 |---Security # 安全 670 |---TaskManagement # 任务管理 671 |---Telephony # 电话服务 672 |---Web # Web 673 |---Window # 窗口 674|---SystemFeature # 系统特性 675 |---Ability # 能力增强 676 |---ApplicationModels # 应用模型 677 |---AutoFill # 自动填充 678 |---Connectivity # 网络与连接 679 |---DataManagement # 数据管理 680 |---DeviceManagement # 设备管理 681 |---DeviceUsageStatistics # 设备使用信息 682 |---DistributedAppDev # 分布式 683 |---FileManagement # 文件管理 684 |---FullScreenStart # 全屏原子化服务 685 |---IDL # IDL 686 |---Internationalnation # 国际化 687 |---Media # 媒体 688 |---Notification # 通知 689 |---ResourceAllocation # 资源配置 690 |---Security # 安全 691 |---TaskManagement # 任务管理 692 |---Telephony # 电话服务 693 |---UIExtensionSamples # 基础能力增强 694 |---Widget # 卡片 695 |---WindowManagement # 窗口管理 696|---SuperFeature # 关键特性 697 |---DistributedAppDev # 分布式 698 |---MultiDeviceAppDev # 一多 699 |---Widget # 卡片 700|---Solutions # 行业解决方案 701 |---Game # 游戏 702 |---IM # 即时通信 703 |---InputMethod # 输入法 704 |---Media # 媒体 705 |---Shopping # 电商 706 |---Social # 社交 707 |---Tools # 工具 708|---Project # 工程能力 709 |---ApplicationHap # 应用程序包 710 |---HapBuild # 流水线预测试工具 711 |---Test # 测试框架 712|---LanguageBaseClassLibrary # 语言基础类库 713 |---ConcurrentModule # 多线程任务 714 |---LanguageBaseClassLibrary # 语言基础类库 715 |---ZipLib # 解压与压缩 716|---Performance # 性能 717 |---ArkRuntime # 方舟运行时 718 |---OperateRDBInTaskPool # TaskPool线程中操作关系型数据库 719 |---PerformanceLibrary # 性能示例 720 |---renderGroup # 性能示例 721``` 722 723## 约束<a name="section18841871178"></a> 724 725安装应用示例之前,请先查看"README_zh.md"文件来确认应用示例是否为stage模型,若为Stage模型需要查看entry/src/main路径下的module.json5文件中的"deviceType"字段来确认该应用支持的设备类型;否则为FA模型,查看entry/src/main路径下的config.json文件中的"deviceType"字段来确认该应用示例支持的设备类型,两种模型都可尝试通过修改该字段使其可以在相应类型的设备上运行。 726 727## 使用方法<a name="section17988202503116"></a> 728 7291. 将独立的应用示例工程导入DevEco Studio进行编译构建及运行调试。 7302. 部分应用示例中含有多个模块,开发者可以选择对单个模块进行编译构建,生成一个HAP应用安装包,也可以对整个工程进行编译构建,生成多个HAP应用安装包。 7313. 安装运行后,即可在设备上查看应用示例运行效果,以及进行相关调试。 732 733## Changlog<a name="section17988202503117"></a> 734 735应用修改记录:[changelog](changelog.md) 736 737## releasenote 738 739应用发布版本分支说明:[releasenote](releasenote.md) 740 741## 相关仓<a name="section17988202503118"></a> 742 7431. [app_sample](https://gitee.com/openharmony/app_samples) 已废弃 7442. [applications_app_sample](https://gitee.com/openharmony/applications_app_samples) 745