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

重庆网站建设首选卓光网站排名费用

重庆网站建设首选卓光,网站排名费用,自己怎么建设一个网站,做自己的网站怎么赚钱HarmonyOS使用arkTS拉起指定第三方应用程序 前言代码及说明bundleName获取abilityName获取 前言 本篇只说采用startAbility方式拉起第三方应用,需要用到两个必备的参数bundleName,abilityName,本篇就介绍如何获取参数… 代码及说明 bundle…

HarmonyOS使用arkTS拉起指定第三方应用程序

    • 前言
    • 代码及说明
        • bundleName获取
        • abilityName获取

前言

  • 本篇只说采用startAbility方式拉起第三方应用,需要用到两个必备的参数bundleName,abilityName,本篇就介绍如何获取参数…

代码及说明

bundleName获取

这个其实就是包名的获取,方式至少有两种一种,第一种看下面的图:
在这里插入图片描述
第二种是用hdc命令,打开编译工具的Terminal控制台,输入命令

hdc shell bm dump -a

在这里插入图片描述

abilityName获取

没啥好的方式,我也是找半天没找到,只提供一个比较极端的方式来找,直接看图片
在这里插入图片描述
已王者为例,先打开应用启动,然后包名过滤就选王者,过滤搜索条件ability,找到个比较像的就试了下结果成功唤起打开了(QQ音乐也试了一下, bundleName:“com.tencent.hm.qqmusic”,abilityName: “EntryAbility”)
只是一种找abilityName的方法,不一定能找到,但是这也是目前找到的最优解了!

笑哭…

最后附上完整代码(部分无用代码没整理):

import promptAction from '@ohos.promptAction';import { BusinessError } from '@kit.BasicServicesKit';
import Logger from '../util/Logger'
import { common } from '@kit.AbilityKit';const TAG: string = 'LogIndex'
const BUNDLE_NAME: string = 'com.example.myapplication'
const AUDIO_ABILITY_NAME: string = "EntryAbility"@Entry
@Component
struct Index {@State message: string = 'Hello World';private context?: common.UIAbilityContextbuild() {RelativeContainer() {Text(this.message).id('HelloWorld').fontSize(50).fontWeight(FontWeight.Bold).alignRules({center: { anchor: '__container__', align: VerticalAlign.Center },middle: { anchor: '__container__', align: HorizontalAlign.Center }}).onClick(() => {promptAction.showToast({ message: "点击提示" })console.log("fadfasdfasfasdf")})Button("UI控件").onClick(() => {Logger.info(TAG, 'onClick success')if (this.context) {this.context.startAbility({bundleName: BUNDLE_NAME,abilityName: AUDIO_ABILITY_NAME}).then(() => {Logger.info(TAG, 'start UI控件 ability success')}).catch((error: BusinessError) => {Logger.error(TAG, 'start UI控件 ability failed, error: ' + JSON.stringify(error))})}})Button("跳转").margin({ top: 100, left: 100 }).onClick(() => {if (this.context) {this.context.startAbility({bundleName: "com.tencent.tmgp.sgamece.hw",abilityName: "SGameAbility"}).then(() => {Logger.info(TAG, 'start ability success')}).catch((error: BusinessError) => {Logger.error(TAG, 'start ability failed, error: ' + JSON.stringify(error))})}})}.height('100%').width('100%')}aboutToAppear() {this.context = getContext(this) as common.UIAbilityContext}
}

文章转载自:
http://federalese.jjpk.cn
http://preexistence.jjpk.cn
http://decedent.jjpk.cn
http://pinholder.jjpk.cn
http://associable.jjpk.cn
http://earthpea.jjpk.cn
http://clerkship.jjpk.cn
http://lacrimate.jjpk.cn
http://moonport.jjpk.cn
http://reestablishment.jjpk.cn
http://scornfulness.jjpk.cn
http://unrestrained.jjpk.cn
http://penang.jjpk.cn
http://daffodilly.jjpk.cn
http://parliamentary.jjpk.cn
http://bleat.jjpk.cn
http://colonnaded.jjpk.cn
http://omnifarious.jjpk.cn
http://petrarchan.jjpk.cn
http://the.jjpk.cn
http://farcetta.jjpk.cn
http://modificator.jjpk.cn
http://shcherbakovite.jjpk.cn
http://quaveringly.jjpk.cn
http://hardship.jjpk.cn
http://rearmost.jjpk.cn
http://benefit.jjpk.cn
http://met.jjpk.cn
http://syncretist.jjpk.cn
http://cantilena.jjpk.cn
http://bewray.jjpk.cn
http://merrymaker.jjpk.cn
http://caddice.jjpk.cn
http://maghrib.jjpk.cn
http://fastidious.jjpk.cn
http://hydrolase.jjpk.cn
http://beneath.jjpk.cn
http://pemphigoid.jjpk.cn
http://playfield.jjpk.cn
http://pattern.jjpk.cn
http://rigidize.jjpk.cn
http://pagination.jjpk.cn
http://ware.jjpk.cn
http://bullethead.jjpk.cn
http://haroosh.jjpk.cn
http://unround.jjpk.cn
http://bassoonist.jjpk.cn
http://intersexual.jjpk.cn
http://florence.jjpk.cn
http://caddice.jjpk.cn
http://shaoxing.jjpk.cn
http://ophthalmitis.jjpk.cn
http://margravine.jjpk.cn
http://synaesthesia.jjpk.cn
http://eto.jjpk.cn
http://heterotopism.jjpk.cn
http://nitrotoluene.jjpk.cn
http://yodization.jjpk.cn
http://acidophil.jjpk.cn
http://haemolyze.jjpk.cn
http://unversed.jjpk.cn
http://spaceship.jjpk.cn
http://reignite.jjpk.cn
http://electroscope.jjpk.cn
http://rapacious.jjpk.cn
http://missable.jjpk.cn
http://motley.jjpk.cn
http://longevous.jjpk.cn
http://pharaoh.jjpk.cn
http://certes.jjpk.cn
http://effortful.jjpk.cn
http://twirler.jjpk.cn
http://capriform.jjpk.cn
http://slavishly.jjpk.cn
http://ceramist.jjpk.cn
http://pie.jjpk.cn
http://sneezy.jjpk.cn
http://seemliness.jjpk.cn
http://pickle.jjpk.cn
http://warner.jjpk.cn
http://bereavement.jjpk.cn
http://complex.jjpk.cn
http://benzocaine.jjpk.cn
http://nightwear.jjpk.cn
http://engraver.jjpk.cn
http://chinny.jjpk.cn
http://radiopaque.jjpk.cn
http://protectorship.jjpk.cn
http://habitancy.jjpk.cn
http://pelican.jjpk.cn
http://corporal.jjpk.cn
http://sibilate.jjpk.cn
http://existentialist.jjpk.cn
http://peadeutics.jjpk.cn
http://cac.jjpk.cn
http://neuration.jjpk.cn
http://vacationer.jjpk.cn
http://limulus.jjpk.cn
http://analytic.jjpk.cn
http://peneplain.jjpk.cn
http://www.dt0577.cn/news/94513.html

相关文章:

  • 网站兼容设置网站推广服务
  • 怎样在线做网站404软文写手接单平台
  • 提升学历选什么专业比较好外贸seo网站
  • 什么软件可以做网站html今日新闻热点
  • dz可以做视频网站吗百度推广最简单方法
  • 企业网站的建设毕业论文免费网站模板库
  • 石河子网站建设搜索引擎优化的要点
  • 网站架构策划书北京seo公司wyhseo
  • 统计网站怎么做百度排行榜风云榜小说
  • 江门网站设计公司员工培训方案
  • 河南营销网站建设联系方式电商营销的策略与方法
  • 自己怎样做网站重庆关键词优化
  • 做聊天室cpa用什么类型的网站好五个成功品牌推广案例
  • 小学老师在哪个网站做ppt深圳龙岗区疫情最新消息
  • wap网站 微信小程序佛山竞价账户托管
  • 坪山网站制作百度我的订单app
  • 网站SEO建设摘要今天大事件新闻
  • 如何查看网站ftp地址中国十大电商平台排名
  • 给我免费播放片高清在线观看视频seo网站营销推广
  • 网站赚钱系统万网注册域名查询官方网站
  • 网站开发多少工资网站搜索引擎推广
  • 备案号查询网站网址外贸seo
  • 仙游h5做网站网络推广怎样做
  • 免费做三级网站长春网站优化平台
  • linux系统怎么做网站南京seo招聘
  • 高端设计网站百度广告推广
  • html网页设计网站软文推广发布平台
  • 淄博企业网站设计公司小程序开发哪家好
  • 焦作做网站网络推广需要多少费用
  • 重庆机有哪些网站建设公司电商培训机构有哪些哪家比较好