Since v3.2.0 Templater also works on Android.
Due to inadequate XML support in Android, custom XML library has to be used. This can be done by registering Xalan XML library.
dependencies {
implementation 'hr.ngs.templater:templater:4.2.0'
implementation 'xalan:xalan:2.7.2'
implementation 'xerces:xercesImpl:2.12.0'
}
Since Android does not support Java awt package, default image converters must be disabled and custom XML parser must be provided. This is done during initialization:
Configuration.builder()
.builtInLowLevelPlugins(false)
.xmlBuilder(new org.apache.xerces.jaxp.DocumentBuilderFactoryImpl(), false)
.build()
To use images Templater image type: ImageInfo
should be used.