如何将 On Demand Dynamic Delivery 模块添加到 React Native 中的原生模块?

问题描述

我需要将我动态下载的(按需动态交付模块)android 模块添加到 react native 中的 native 模块中。如何实现?

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
    }
} 

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)