HarmonyOS跨模块NAPI调用最佳实践(2)
HarmonyOS跨模块NAPI调用最佳实践(2)关键实现1.主页面与多模块调用主页面提供5个按钮,分别调用entry自身、HAR和HSP的Native与ArkTS方法:typescriptentrysrcmainetspagesIndex.etsimportnapifrom'libentry.so';EntryComponentstructIndex{build(){Column(){Button($r('app.string.callnativemethod')).onClick((){this.getUIContext().getPromptAction().showToast({message:'Nativemethodcallsucceed,resultis'+napi.add(2,...