当前位置:网站首页>Maykle Studio - HarmonyOS Application Development Fourth Training
Maykle Studio - HarmonyOS Application Development Fourth Training
2022-08-11 06:16:00 【C_yyy89】
Foreword
This article is my fourth training note on HarmonyOS application development. As a developer in the IOT team of Maykle Studio, and a developer who is also learning HarmonyOS development technology, I have witnessed Huawei's progress.Come as soon as possible, and I hope that Chinese developers will become stronger and stronger. I would like to continue to thank Jin Qige for his explanation.
Learning Materials:
I. Web Components
First add network permissions
For network permission configuration, please refer to Section 9 of the technical fat document Technology Fat-Huawei Hongmeng System Application OpenHarmony JS Front-end Development Basic Tutorial-End(jspang.com)
Note: A page only supports one web component, which will be displayed in full screen. If there are other components in the page, they will be covered by the web component, and the web component will not follow the transition animation events.
2.Carmera component
The camera component provides preview and photo functions.
Add permission ohos.permission.CAMERA
Method takePhoto
Callback function (!!very important!!)
Three, real machine debugging preparation steps
On the Hongmeng mobile phone (mine is HUAWEI nova 7), Settings - About Phone - Click the version number 6 times in a row to enter the developer mode, use a USB cable to connect to the computer, select the file transfer on the phone, and in Settings -- System and Updates - Developer options, turn on USB debugging.And finally auto-sign on DevEco.
AppGallery Connect (huawei.com)
Signing needs to create an app on the above website first, and then return to automatically sign
In the DevEco run/debug configuration interface, you can set the debugging code type and set the Hap package installation method.
The debugging effect is as follows:
Add the code to remove the black box
"metaData":{"customizeData":[{"name": "hwc-theme","extra": "","value": "androidhwext:style/Theme.Emui.Light.NoTitleBar"}]}
The effect is as follows:
Four. Key points of this training
4.1 Camera component callback function
Because the photo uri generated when taking a photo can only be accessed by the local machine, a conversion is required.
As shown above, be sure to pay attention to details.
4.2 web components
A page only supports one web component, which will be displayed in full screen. If there are other components in the page, they will be covered by the web component, and the web component will not follow the transition animation.It can be solved with the router.push method.
4.3 Code Details
This means that under the class menu-tab-item, if $item === currentTab, add the class menu-tab-item-text, otherwise add the class menu-tab-item-normal.The reference article is attached below:
Finally, don't say anything, thank you Jin Qi!!!
边栏推荐
- GBase 8s共享内存中的常驻内存段
- AI智能图像识别的工作原理及行业应用
- 梅科尔工作室-HarmonyOS应用开发第三次培训
- 架构设计杂谈
- 目标检测——Faster R-CNN 之 Fast R-CNN
- CNN-based Point Cloud De-Noising
- OpenPCDet installs the latest version: spconv in one step
- BGP联邦实验
- 通过字符设备虚拟文件系统实现kernel和userspace数据交换(基于kernel 5.8测试通过)
- Mei cole studios - sixth DjangoWeb application framework + MySQL database training
猜你喜欢
随机推荐
GBase数据库监控
浙江大学软件学院2020年保研上机真题练习
GBase 8a技术特性-集群架构
Redis主从复制的搭建
RIP综合实验
TAMNet:A loss-balanced multi-task model for simultaneous detection and segmentation
centos—docker安装mysql
OSI TCP/IP学习笔记
【OAuth2】授权机制
SCNet: Semantic Consistency Networks for 3D Object Detection
MPLS 实验
XSS跨站脚本攻击详解以及复现gallerycms字符长度限制短域名绕过
微信小程序-腾讯云即时通信 IM 小程序直播(一)
order by注入,limit注入,宽字节注入
Mei cole studios - sixth DjangoWeb application framework + MySQL database training
2022年最新安全帽佩戴识别系统
CVPR2022——A VERSATILE MULTI-VIEW FRAMEWORK
Robust 3D Object Detection in Cold Weather Conditions
动画(其二)
梅科尔工作室-DjangoWeb 应用框架+MySQL数据库第二次培训