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

陕西示范校建设专题网站中山口碑seo推广

陕西示范校建设专题网站,中山口碑seo推广,建设一个网站需要那些技术,php wordpress 关系在开发OpenHarmony的时候,经常遇到需要把所有测试功能的hap做成一个hap的需求。显然如果一个hap内集成所有测试hap的方案需要花费较大时间成本且各个测试hap之间api并不统一。这里采用应用间跳转的方式。 参考资料 官方文档:应用间跳转概述https://gite…

在开发OpenHarmony的时候,经常遇到需要把所有测试功能的hap做成一个hap的需求。显然如果一个hap内集成所有测试hap的方案需要花费较大时间成本且各个测试hap之间api并不统一。这里采用应用间跳转的方式。

  • 参考资料
    • 官方文档:应用间跳转概述
    • https://gitee.com/scenario-samples/pull-other-app

实现思路

1.这里采用指定Ability方式(即显式Want)拉起其他应用方式。

import Want from '@ohos.app.ability.Want';
import common from '@ohos.app.ability.common';
import { hilog } from '@kit.PerformanceAnalysisKit';
import { BusinessError } from '@ohos.base';@Entry
@Component
struct Index {context = getContext(this) as common.UIAbilityContext;navPathStack: NavPathStack = new NavPathStack();@StylescommonButton() {.width(250).margin(5)}build() {Navigation(this.navPathStack) {Column() {Text('通过startAbility拉起:')Button('跳转系统相机').onClick(() => {let want: Want = {bundleName: 'com.ohos.camera',abilityName: 'com.ohos.camera.MainAbility',};this.context.startAbilityForResult(want).then((data) => {hilog.info(0x0000, 'Success', JSON.stringify(data))}).catch(() => {hilog.info(0x0000, 'error', '')})}).commonButton()Button('跳转系统设置wifi页面').onClick(() => {let want: Want = {bundleName: 'com.ohos.settings',abilityName: 'com.ohos.settings.MainAbility',uri: 'wifi', // 对应wifi设置页,不传就跳转系统设置首页/当前所在页};this.context.startAbility(want).then(() => {}).catch((err: BusinessError) => {hilog.error(0x0000, 'Failed to startAbility. Code:', `${err.code}${err.message}`);});}).commonButton()Button('跳转系统设置蓝牙页面').onClick(() => {let want: Want = {bundleName: 'com.ohos.settings',abilityName: 'com.ohos.settings.MainAbility',uri: 'bluetooth', // 对应wifi设置页,不传就跳转系统设置首页/当前所在页};this.context.startAbility(want).then(() => {}).catch((err: BusinessError) => {hilog.error(0x0000, 'Failed to startAbility. Code:', `${err.code}${err.message}`);});}).commonButton()Button('跳转系统音乐应用').onClick(() => {let want: Want = {bundleName: 'ohos.samples.distributedmusicplayer',abilityName: 'ohos.samples.distributedmusicplayer.MainAbility',uri: 'bluetooth', // 对应wifi设置页,不传就跳转系统设置首页/当前所在页};this.context.startAbility(want).then(() => {}).catch((err: BusinessError) => {hilog.error(0x0000, 'Failed to startAbility. Code:', `${err.code}${err.message}`);});}).commonButton()}.width('100%').height('100%')}.title('拉起系统及三方应用')}
}

snapshot_20250226_172037.jpeg

本样例源码

https://gitee.com/from-north-to-north/OpenHarmony_p7885/blob/master/hap/easy_demo/demo_tiaozhuan/README.md

http://www.dtcms.com/wzjs/100330.html

相关文章:

  • 竭诚网络网站建设公司朝阳seo排名优化培训
  • 济南网站建设流程建站平台哪家好
  • 网站服务器和vps做一台百度网盟推广怎么做
  • 漳州网站建设今日特大新闻新事
  • 南京做网站哪家好石家庄网站seo
  • 一级域名 二级域名 目录网站推广电商网站
  • 万网如何上传网站互联网推广招聘
  • 网站建设的市场有多大网站建设制作专业
  • 太原网站建设地图常见的网络营销平台有哪些
  • 网站维护 静态页面服务器租用
  • 部门网站建设seo分析
  • 公司网站推广如何做现在如何进行网上推广
  • 东莞做个网站百度网盘优化
  • 建设部网站证书查询网页设计工作室长沙
  • wordpress 获得当前url重庆seo推广公司
  • 加强机关网站内容建设今日热点
  • 残疾人无障碍网站怎么做武汉网络关键词排名
  • 男人和女人做羞羞的免费网站郴州网站建设网络推广渠道
  • 58同城招聘 招聘网许昌seo推广
  • 手机网站与PC网站长春seo排名扣费
  • 中国建设银行东莞市网站提高工作效率的工具
  • 网站视频主持人网临沂网站建设公司哪家好
  • 东莞品牌网站设计公司网址如何下载视频
  • 安卓毕业设计代做网站青岛seo关键词
  • 罗马尼亚网站后缀长沙网站开发
  • 湖南建网站设计网络推广方案
  • 虚拟主机如何做网站国外免费建站网站搭建
  • 网站制作加教程视频网站制作培训
  • 建设网站好公司哪家好手机导航下载2022新版
  • 企业为什么做网站 图片国际军事新闻