Mini Program Domain and Privacy API Verification
During the utilization of the Mini Program, the legitimacy of the interface request domain is verified. Additionally, if a privacy API is set in the management background, authorization verification is also conducted. However, verification is not performed in the following scenarios:
Support for Modularized Projects
When developers simultaneously use the @JsPlugin or @ProxyService annotations in multiple modules of a modularized project, the following error may occur during the Make Project process:
The following configuration is required to support multi-modularized projects:
1. In each module that uses the @JsPlugin or @ProxyService annotations, add the following code to the build.gradle:
android {
defaultConfig {
javaCompileOptions {
annotationProcessorOptions {
arguments = [tcmppModuleName: "Demo"]
}
}
}
}
2. Register the module in the initialization code:
@ProxyService(proxy = MiniConfigProxy.class)
public class MiniConfigProxyImpl extends MiniConfigProxy {
@Override
public MiniInitConfig buildConfig() {
MiniInitConfig.Builder builder = new MiniInitConfig.Builder();
return builder
.registerModule("Demo")
.registerModule("Test")
.build();
}
}
Note:
If the developers only have one module using the @JsPlugin or @ProxyService annotations, the above configuration can be ignored, because the SDK will have a default module name internally.
Was this page helpful?