This example shows how to write custom java code in android/app/src and call it using jnigen generated bindings.
Run flutter run to run the app.
To regenerate bindings after changing Java code, run flutter pub run jnigen --config jnigen.yaml. This requires at least one APK build to have been run before, so that it's possible for jnigen to obtain classpaths of Android Gradle libraries. Therefore, once run flutter build apk before generating bindings for the first time, or after a flutter clean.
These are general steps to integrate Java code into a flutter project using jnigen.
android/ subproject of the flutter app.jnigen.yaml in this example.