Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

201
Views
How to create an extensible app in React Native

I'm trying to make my app modular. There will be a core extensible base module. In Android, I plan on having a sub-directory in the assets folder, called plugins, where extensions to the core app will be downloaded into as .apks.

How can I create such a modular app in React Native?

I have a working implementation in Android. I currently have my app loading external plugins that implement an interface:

public interface IDynamicModule {
  String getText();
}  

I am loading the APKs using DexClassLoader :

class ModuleLoader(val cacheDir: String) {

    fun load(dex: File, cls: String = "com.example.dynamicmodule.DynamicModule"): IDynamicModule {

        try {
            val classLoader = DexClassLoader(dex.absolutePath, cacheDir,
                    null, this.javaClass.classLoader)

            val moduleClass = classLoader.loadClass(cls)
            if (IDynamicModule::class.java.isAssignableFrom(moduleClass)) {
                return moduleClass.newInstance() as IDynamicModule
            }
        } catch (e: Exception) {
            Log.e("ModuleLoader", e.message, e)
        }

        return IDynamicModule { "Failed to load" }
    }    
}  

Thank you all in advance.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!