当前位置: 首页 > news >正文

怎么通过域名访问网站2345电脑版网址导航

怎么通过域名访问网站,2345电脑版网址导航,阅读网页设计,专业制作网站是什么应用接续 介绍 基于ArkTS扩展的声明式开发范式编程语言编写的一个分布式视频播放器#xff0c;主要包括一个直播视频播放界面#xff0c;实现视频播放时可以从一台设备迁移到另一台设备继续运行#xff0c;来选择更合适的设备继续执行播放功能以及PAD视频播放时协同调用手…应用接续 介绍 基于ArkTS扩展的声明式开发范式编程语言编写的一个分布式视频播放器主要包括一个直播视频播放界面实现视频播放时可以从一台设备迁移到另一台设备继续运行来选择更合适的设备继续执行播放功能以及PAD视频播放时协同调用手机编辑发送弹幕功能。 效果预览 使用说明 准备手机端与平板端两台设备并且登录同一华为账号双端设备打开WI-FI和蓝牙建议双端设备接入同一个局域网可提升数据传输的速度双端设备均安装此应用滑动浏览手机端视频打开平板端应用点击平板端手机输入按钮调起手机端输入内容提交后平板端查看 具体实现 在实现协同接口前应用需要申请协同所需的访问控制权ohos.permission.DISTRIBUTED_DATASYNC。 在requestPermissions字段中增加权限声明ohos.permission.DISTRIBUTED_DATASYNC同时需要在应用首次启动时弹窗向用户申请授权在用户手动允许授权后应用才会真正获取相应权限从而成功访问操作目标对象。 在EntryAbility类中实现以下函数从而在调用时动态弹窗向用户申请权限。 /** Copyright (c) 2024 Huawei Device Co., Ltd.* Licensed under the Apache License, Version 2.0 (the License);* you may not use this file except in compliance with the License.* You may obtain a copy of the License at** http://www.apache.org/licenses/LICENSE-2.0** Unless required by applicable law or agreed to in writing, software* distributed under the License is distributed on an AS IS BASIS,* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.* See the License for the specific language governing permissions and* limitations under the License.*/import { abilityAccessCtrl, AbilityConstant, bundleManager, Permissions, UIAbility, Want } from kit.AbilityKit; import { window } from kit.ArkUI; import { WindowUtil } from ../utils/WindowUtil; import Logger from ../utils/Logger;export default class EntryAbility extends UIAbility {contentStorage?: LocalStorage;onContinue(wantParam: Recordstring, Object) {Logger.info(wantParam.version.toString(), wantParam.targetDevice.toString());// Preparing to Migrate Datalet activeLive: number AppStorage.getnumber(activeLive) as number;// Save the data to be migrated in the data field of wantParam.wantParam[activeLive] activeLive;// Setting the Source End Not to ExitwantParam[ohos.extra.param.key.supportContinueSourceExit] false;Logger.info(activeLive.toString());return AbilityConstant.OnContinueResult.AGREE}onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {Logger.info(Ability onCreate);this.checkPermissions();// If the invoking reason is migration, set the status to migratable to cope with cold start (ensuring migration continuity)if (launchParam.launchReason AbilityConstant.LaunchReason.CONTINUATION) {this.context.setMissionContinueState(AbilityConstant.ContinueState.ACTIVE, (result) {Logger.info(JSON.stringify(result));});}// Cold start of the application: Restore the saved migration dataif (launchParam.launchReason AbilityConstant.LaunchReason.CONTINUATION) {// Restore migrated data from wantlet activeLive want?.parameters?.activeLive;AppStorage.setOrCreatenumber(activeLive, activeLive as number);Logger.info(activeLive as string);// Explicit invocation of page restorethis.contentStorage new LocalStorage();Logger.info(Ability onCreate restoreWindowStage);this.context.restoreWindowStage(this.contentStorage);}}onNewWant(want: Want, launchParam: AbilityConstant.LaunchParam) {Logger.info(Ability onCreate);// If the invoking reason is migration, set the status to migratable to cope with hot start (ensuring migration continuity)if (launchParam.launchReason AbilityConstant.LaunchReason.CONTINUATION) {this.context.setMissionContinueState(AbilityConstant.ContinueState.ACTIVE, (result) {Logger.info(JSON.stringify(result));});}//During the warm start of an application: Restore the saved migration dataif (launchParam.launchReason AbilityConstant.LaunchReason.CONTINUATION) {// Restore migrated data from wantlet activeLive want?.parameters?.activeLive;AppStorage.setOrCreatenumber(activeLive, activeLive as number);Logger.info(activeLive as string);// Explicit invocation of page restorethis.contentStorage new LocalStorage();Logger.info(Ability onNewWant restoreWindowStage);this.context.restoreWindowStage(this.contentStorage);}}// Check permission granting and dynamically apply for permissionsasync checkPermissions(): Promisevoid {const permissions: ArrayPermissions [ohos.permission.DISTRIBUTED_DATASYNC];let grantStatus: abilityAccessCtrl.GrantStatus await this.checkAccessToken(permissions[0]);// Verifying Permission Grantingif (grantStatus abilityAccessCtrl.GrantStatus.PERMISSION_GRANTED) {// GrantedLogger.info(Permission already granted.);} else {// Not granted. Dynamically apply for authorization in the dialog box displayed to the userlet atManager abilityAccessCtrl.createAtManager();try {atManager.requestPermissionsFromUser(this.context, [ohos.permission.DISTRIBUTED_DATASYNC], (err, data) {Logger.info(JSON.stringify(data));});} catch (err) {Logger.error(JSON.stringify(err));return;}}}// Get the grant status of the current apps permissionsasync checkAccessToken(permission: Permissions): PromiseabilityAccessCtrl.GrantStatus {let atManager abilityAccessCtrl.createAtManager();let grantStatus: abilityAccessCtrl.GrantStatus -1;// Obtains the token IDlet tokenId: number 0;try {let bundleInfo: bundleManager.BundleInfo await bundleManager.getBundleInfoForSelf(bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_APPLICATION);let appInfo: bundleManager.ApplicationInfo bundleInfo.appInfo;tokenId appInfo.accessTokenId;} catch (err) {Logger.error(JSON.stringify(err));}try {grantStatus await atManager.checkAccessToken(tokenId, permission);} catch (err) {Logger.error(JSON.stringify(err));}return grantStatus;}onDestroy(): void {Logger.info(Ability onDestroy);}onWindowStageCreate(windowStage: window.WindowStage): void {// Main window is created, set main page for this abilityLogger.info(Ability onWindowStageCreate);WindowUtil.requestFullScreen(windowStage, this.context);WindowUtil.updateStatusBarColor(this.context, true);windowStage.loadContent(pages/LivePage, (err) {if (err.code) {Logger.error(JSON.stringify(err) ?? );return;}Logger.info(Succeeded in loading the content.);});}onWindowStageDestroy(): void {// Main window is destroyed, release UI related resourcesLogger.info(Ability onWindowStageDestroy);}onWindowStageRestore(windowStage: window.WindowStage): void {WindowUtil.requestFullScreen(windowStage, this.context);}onForeground(): void {// Ability has brought to foregroundLogger.info(Ability onForeground);}onBackground(): void {// Ability has back to backgroundLogger.info(Ability onBackground);} }获取目标设备的设备ID。在发起端设置目标组件参数调用startAbilityForResult()接口启动目标端UIAbility异步回调中的data用于接收目标端UIAbility停止自身后返回给调用方UIAbility的信息。在目标端UIAbility任务完成后调用terminateSelfWithResult()方法将数据返回给发起端的UIAbility。发起端UIAbility接收到目标端UIAbility返回的信息对其进行处理。 以上就是本篇文章所带来的鸿蒙开发中一小部分技术讲解想要学习完整的鸿蒙全栈技术。可以在结尾找我可全部拿到 下面是鸿蒙的完整学习路线展示如下 除此之外根据这个学习鸿蒙全栈学习路线也附带一整套完整的学习【文档视频】内容包含如下 内容包含了ArkTS、ArkUI、Stage模型、多端部署、分布式应用开发、音频、视频、WebGL、OpenHarmony多媒体技术、Napi组件、OpenHarmony内核、鸿蒙南向开发、鸿蒙项目实战等技术知识点。帮助大家在学习鸿蒙路上快速成长 鸿蒙【北向应用开发南向系统层开发】文档 鸿蒙【基础实战项目】视频 鸿蒙面经 为了避免大家在学习过程中产生更多的时间成本对比我把以上内容全部放在了↓↓↓想要的可以自拿喔谢谢大家观看
http://www.hkea.cn/news/14469513/

相关文章:

  • 海口网站建设的开发方案百度搜索风云榜游戏
  • 免费的网站推广怎么做效果好wordpress 搜索不能用
  • 如何建自己网站做淘宝客网站建设的商业目的
  • 网站建设中敬请期待企业网站建设博客论坛
  • 建网站 方法wordpress附带默认脚本
  • 浦东企业网站建设深圳短视频拍摄公司
  • 江西企业 网站建设技术支持 东莞网站建设
  • 网站如何做301c 网站开发 图书下载
  • 中国移动网站备案管理系统东莞常平医院
  • 电子商务网站建设实训步骤最新的军事新闻报道
  • 嘉兴网站seo外包广告图片网站源码
  • 做网站用什么软件做微信怎么开创公众号
  • 仿京东网站后台域名制作网站吗
  • 贵阳市建设局网站公司网站主页设计图片
  • 狮山网站建设赣州市微语网络科技有限公司
  • 如何查找织梦网站后台项目信息查询平台
  • 生物做实验的网站清风网站建设
  • 中山市智能h5网站建设公司如何创建自己的邮箱
  • 常州微信网站建设公司扬中门户
  • 网站群项目建设实施进度计划关键字优化软件
  • 企业建设网站例文做网站有什么软件吗
  • 建站套餐推荐在线制作图片热区
  • 网站建设公司兴田德润i优惠吗游戏网址大全有哪些
  • react 手机网站开发昆明网站建设介绍
  • 爱星光(istar)高端网站建设杭州设计 公司 网站
  • 济宁城乡住房建设网站织梦网站做404页面
  • 网站优化站外链接怎么做西安网站公司推广
  • 南京做网站是什么wordpress打开提速
  • 惠来建设局网站网站开发用户登录前 登录后
  • 怎么用文件传输协议登录网站建网站知乎