问题
im trying to implement a dynamic feature where from my base module i should call some methods in the feature, buts its only possible to call base methods from the feature, is there any way to make feature code accessible from base module? (i understand what can happen when feature is not installed)
I've implemented it using the default google docs, so i have no different code or implementation
Today without dynamic feature i have two .apks and im using communication thru AIDL, im trying to remove AIDL usage and use direct call
回答1:
I'm also trying dynamic feature modules.
Here is my approach:
- Keep a base abstract class in base app.
- Implements the base class in dynamic feature.
Feature feature = (Feature) Class.forName("full.class.name.FeatureImpl").newInstance();
Then you got the instance to call into the feature code.
来源:https://stackoverflow.com/questions/51528207/call-dynamic-feature-code-from-base-module