HarmonyOS 鸿蒙Next stage中getAppVersionInfo怎么用呀
HarmonyOS 鸿蒙Next stage中getAppVersionInfo怎么用呀
stage中getAppVersionInfo怎么用呀 ? api的提示FA了
3 回复
楼主您好,该问题建议通过在线提单提交问题。
getAppVersionInfo() {
// this.versionName=App.getInfo().versionName
bundleManager.getBundleInfoForSelf(bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_APPLICATION)
.then(bundleInfo => {
Logger.info('versionName:' + bundleInfo.versionName + ', versionCode:' + bundleInfo.versionCode + ',packageName:' + bundleInfo.name)
this.versionName = bundleInfo.versionName
const appInfo = bundleInfo.appInfo
Logger.info('packageName:' + appInfo.name + ', label:' + appInfo.label + ', description:' + appInfo.description
+ ', icon:' + appInfo.icon + ', process:' + appInfo.process + ', codePath:' + appInfo.codePath)
})
}