当前位置:网站首页>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!!!
边栏推荐
猜你喜欢
【sqlyog】【mysql】csv导入问题
NAT模式 LVS负载均衡群集部署
Nodered系列—使用node-red-node-mysql写入mysql详细步骤
梅科尔工作室-Pr第二次培训笔记(基本剪辑操作和导出)
XSS跨站脚本攻击详解以及复现gallerycms字符长度限制短域名绕过
使用TD-workbench管理tDengine数据库数据
Maykle Studio - Second Training in HarmonyOS App Development
OpenPCDet安装最新版:spconv一步到位
梅科尔工作室-DjangoWeb 应用框架+MySQL数据库第六次培训
关于修改挂载到宿主机上的mysql配置文件不生效这件事
随机推荐
【mysql】查询不区分大小写(用户密码登录不区分大小写)
CVPR2020:Seeing Through Fog Without Seeing Fog
动画(其二)
【转载】图表:数读2022年上半年国民经济
CVPR2020: Seeing Through Fog Without Seeing Fog
Thread Handler
CNN-based Point Cloud De-Noising
梅科尔工作室-DjangoWeb 应用框架+MySQL数据库第二次培训
四大组件之一BroadCast(其一)
微信小程序canvas画图,保存页面为海报
用正则验证文件名是否合法
Redis持久化方案RDB详解
Reconstruction and Synthesis of Lidar Point Clouds of Spray
LAGRANGIAN FLUID SIMULATION WITH CONTINUOUS CONVOLUTIONS
通过字符设备虚拟文件系统实现kernel和userspace数据交换(基于kernel 5.8测试通过)
The working principle and industry application of AI intelligent image recognition
梅科尔工作室-HarmonyOS应用开发第一次培训
BGP联邦实验
梅科尔工作室-华为云ModelArts第一次培训
GBase 8a 并行技术