随笔分类 -  鸿蒙app开发·功能篇

鸿蒙开发这种常见的功能实现与案例
摘要:ijk配置信息 import { IjkMediaPlayer } from "@baijia/ijkplayer"; import { LogUtils, LYProtocol, SigMaStarProtocol } from "../../../../Index"; import { Prot 阅读全文
posted @ 2026-08-24 16:24 带头大哥d小弟 阅读(3) 评论(0) 推荐(0)
摘要:蜂窝数据和wifi通道切换 import { BusinessError } from '@kit.BasicServicesKit'; import { connection } from '@kit.NetworkKit'; import { data } from '@kit.Telephon 阅读全文
posted @ 2026-06-16 20:02 带头大哥d小弟 阅读(10) 评论(0) 推荐(0)
摘要:生成二维码 import { Constants, ToolBarTheme, TopToolBar } from "@common/basic" import { BarcodeFormat, BitMatrix, EncodeHintType, MultiFormatWriter } from 阅读全文
posted @ 2026-05-28 17:55 带头大哥d小弟 阅读(20) 评论(0) 推荐(0)
摘要:方法一:需下载到本地(不推荐) import { GetFirstFrameAnimation } from './GetFirstFrameAnimation'; import { media } from '@kit.MediaKit'; import { image } from '@kit. 阅读全文
posted @ 2026-05-20 15:54 带头大哥d小弟 阅读(5) 评论(0) 推荐(0)
摘要:状态栏设置下载进度条通知 /** * @Description: 下载进度条状态栏通知class */ import { notificationManager } from '@kit.NotificationKit'; import { BusinessError } from '@kit.Ba 阅读全文
posted @ 2026-04-24 11:18 带头大哥d小弟 阅读(8) 评论(0) 推荐(0)
摘要:import { AppUtil, ToastUtil } from '@pura/harmony-utils'; import { DownloadManager, UploadManager, DownloadConfig, DownloadListener, DownloadTask, Dow 阅读全文
posted @ 2026-03-19 11:24 带头大哥d小弟 阅读(14) 评论(0) 推荐(0)
摘要:import { Log } from '@abner/log'; import wifiManager from '@ohos.wifiManager'; import { StringUtils } from '../StringUtils'; class wifiManagerUtil { i 阅读全文
posted @ 2026-01-16 16:54 带头大哥d小弟 阅读(21) 评论(0) 推荐(0)
摘要:emitter工具函数class /** * @Author: * @Date: 2025.11.19 * @Description: emitter环境与函数 */ import { emitter } from '@kit.BasicServicesKit'; export class Emit 阅读全文
posted @ 2026-01-16 10:38 带头大哥d小弟 阅读(12) 评论(0) 推荐(0)
摘要:tcp消息发送,模拟队列版本 /** * @Author: * @Date: 2026.01.15 * @Description: TCP Socket send队列封装管理class */ import { BusinessError } from '@kit.BasicServicesKit'; 阅读全文
posted @ 2026-01-15 16:46 带头大哥d小弟 阅读(16) 评论(0) 推荐(0)
摘要:将普通不可观察数据变为可观察数据 、、、 UIUtils.makeObserved('对象、接口对象') 、、、 使V1的状态变量能够在@ComponentV2中观察 、、、 mport { UIUtils } from '@kit.ArkUI'; @Observed class ObservedC 阅读全文
posted @ 2025-12-02 09:22 带头大哥d小弟 阅读(13) 评论(0) 推荐(0)
摘要:获取系统语言、地域、国家函数。 // 获取系统语言 let systemLanguage: string = i18n.System.getSystemLanguage(); // systemLanguage为当前系统语言 // 获取系统地区 let systemRegion: string = 阅读全文
posted @ 2025-11-28 13:37 带头大哥d小弟 阅读(47) 评论(0) 推荐(0)
摘要:分享工具 点击查看代码 import { systemShare } from '@kit.ShareKit'; import { uniformTypeDescriptor as utd } from '@kit.ArkData'; import { common } from '@kit.Abi 阅读全文
posted @ 2025-11-12 16:22 带头大哥d小弟 阅读(48) 评论(0) 推荐(0)
摘要:1、从图库获取视频和图片,返回uri合集 点击查看代码 private selectMedia(mediaType: string = "image"): Promise<string> { const photoSelectOptions = new photoAccessHelper.Photo 阅读全文
posted @ 2025-11-12 14:00 带头大哥d小弟 阅读(41) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2025-10-09 16:34 带头大哥d小弟 阅读(0) 评论(0) 推荐(0)
摘要:第一步:权限申请 在module.json5中进行如下配置; "requestPermissions": [ { "name": "ohos.permission.PRINT", "reason": "$string:permissionsReason", "usedScene": { "abili 阅读全文
posted @ 2025-10-08 19:06 带头大哥d小弟 阅读(22) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2025-06-18 16:22 带头大哥d小弟 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2025-06-16 15:14 带头大哥d小弟 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2025-06-15 18:19 带头大哥d小弟 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2025-05-19 15:09 带头大哥d小弟 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2025-05-15 20:24 带头大哥d小弟 阅读(0) 评论(0) 推荐(0)