当前位置:网站首页>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!!!
边栏推荐
猜你喜欢
Reconstruction and Synthesis of Lidar Point Clouds of Spray
DOM破坏
【转载】图表:数读2022年上半年国民经济
Joint 3D Instance Segmentation and Object Detection for Autonomous Driving
Zhejiang University School of Software 2020 Guarantee Research Computer Real Question Practice
动画(其二)
第七届集美大学程序设计竞赛(个人赛)题解
浙江大学软件学院2020年保研上机真题练习
Maykle Studio - HarmonyOS Application Development Third Training
Nodered系列—写入tDengine超级表,自动创建子表
随机推荐
GBase 8s的分片和索引
安全帽识别-施工安全的“监管者”
华为手机软键盘挡住Toast
解决SmartRefreshLayout/SwipeRefreshLayout与RecyclerView下拉冲突的问题
若依分离版—增加通知公告预览功能
梅科尔工作室-DjangoWeb 应用框架+MySQL数据库第四次培训
更新GreenDAO实体类导致的编译错误
华为adb wifi调试断线问题解决
SCNet:Semantic Consistency Networks for 3D Object Detection
梅科尔工作室-HarmonyOS应用开发第一次培训
windows下的redis安装及密码修改
GBase 8s中IO读写方法
2022年最新安全帽佩戴识别系统
Nodered系列—写入tDengine超级表,自动创建子表
Socket 网络协议 等
GBase 8a MPP Cluster产品高级特性
>>数据管理:DAMA简介
解决Glide图片缓存问题,同一url换图片不起作用问题
经纬度距离
GBASE数据库迁移(Oracle到GBase 8s的数据类型映射)