This app bundles OCR functionality that can be called from other apps via Intents. Depending on the product flavor, it either uses Mlkit or Tesseract via Tesseract4Android.
It listens for Intents with action "org.totschnig.ocr.action.RECOGNIZE" and expects an Uri pointing to a JPEG file as data.
The recognized text is passed back in the extra "result" as an object of class Text, that must be copied into the client app.
See MyExpenses for an example: