中国优质的IT技术网站
专业IT技术创作平台
IT职业在线教育平台
如何获取应用自身的bundleName
微信扫码分享
bundleManager.getBundleInfo(bundleName, bundleFlags, userId, (err, data) => { if (err) { hilog.error(0x0000, 'testTag', 'getBundleInfo failed: %{public}s', err.message); } else { hilog.info(0x0000, 'testTag', 'getBundleInfo successfully: %{public}s', JSON.stringify(data)); } });
bundleManager.getBundleInfoForSelf(bundleFlags).then((data) => { hilog.info(0x0000, 'testTag', 'getBundleInfoForSelf successfully. Data: %{public}s', JSON.stringify(data)); }).catch((err: BusinessError) => { hilog.error(0x0000, 'testTag', 'getBundleInfoForSelf failed. Cause: %{public}s', err.message); });