0

My app is called MyNiceApp. MyNiceApp is mostly just a core that loads a CORE view which gets populated by other plugins which the user downloads as wishes. I'm thinking that Android will install MyNiceApp in a folder called MyNiceApp, just as linux would default to opt/MyNiceApp or Windows to Program Files/MyNiceApp. I'm thinking it would be better organized if I had a folder created under MyNiceApp/plugins, then have DexClassLoader crawl MyNiceApp/plugins for downloaded plugins, then I could call my Class implementations, and dynamically load the plugin views to the core view at runtime.

QUESTIONS

  1. How can I create this folder (MyNiceApp/plugins) when the app gets installed,
  2. How can DexClassLoader be pointed to MyNiceApp/plugins folder,
  3. Is this the best approach for this type of situation
Program-Me-Rev
  • 6,184
  • 18
  • 58
  • 142
  • 1
    If you plan on distributing through the Play Store, please discuss your plans with an attorney first. Quoting [the guidelines](https://play.google.com/about/privacy-security/malicious-behavior/), "Apps or SDKs that download executable code, such as dex files or native code, from a source other than Google Play" are "explicitly prohibited". "I'm thinking that Android will install MyNiceApp in a folder called MyNiceApp" -- um, no. – CommonsWare Jul 26 '17 at 21:05
  • Thank's for the reply @CommonsWare. I'm looking at a way to load the plugins at a central place where I could crawl and load them all. What would be the best approach? – Program-Me-Rev Jul 26 '17 at 21:11
  • 1
    Distribute the plugins as APKs, and communicate with them using IPC. Security on `DexClassLoader`-based techniques ranges from so-so to craptastic, which is why Google has banned them. – CommonsWare Jul 26 '17 at 21:16

0 Answers0