0

我需要将我的动态下载(按需动态交付模块)android模块添加到本机模块中的本机反应。如何做到这一点?

class RnPackage : ReactPackage {

    override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
        return arrayListOf(ReactVideoPlayerManager())
    }

    override fun createNativeModules(
            reactContext: ReactApplicationContext): List<NativeModule> {
        val modules = ArrayList<NativeModule>()
        modules.add(RnBridge(reactContext))
        
        //need to add on demand module here (once the download is complete)

        return modules
    }
} 
4

0 回答 0