Java/Kotlin Android plugins
A plugin bridges the game to an Android SDK. Its AAR is included in a Gradle project; a desktop DLL or C# script alone does not register a Java plugin.
A plugin bridges the game to an Android SDK. Its AAR is included in a Gradle project; a desktop DLL or C# script alone does not register a Java plugin.
Minimum contract
- Derive a Java/Kotlin class from
org.reckfellengine.reckfell.plugin.ReckfellPluginand implement a stablegetPluginName(). Changing it after release requires updating callers. - Mark engine-callable methods
@UsedByReckfell. The oldgetPluginMethods()list is deprecated. Use bridge-supported types; adapt arbitrary SDK objects before returning them. - For events, declare
SignalInfoentries ingetPluginSignals()and useemitSignalwith matching names and arguments. - Register the class through manifest metadata prefixed
org.reckfellengine.plugin.v2.; its value is the fully qualified class name. Include the AAR and dependencies in Gradle export. - Export a debug APK and check the plugin singleton by name before calling methods. A missing singleton is a registration/packaging failure, not a reason to retry calls forever.
Threads and lifecycle
Call Android UI on its UI thread. Marshal SDK callback results to the appropriate engine thread; do not mutate the Entity tree from arbitrary callbacks. Use onMainPause, onMainResume and onMainDestroy to stop subscriptions and release external resources.
If debug works but release fails, inspect shrinker/keep rules, manifest and transitive dependencies in the final APK. Registration interfaces were source-reviewed; no plugin example was compiled or tested on a device.