Hello Experts,
Which rules engine can I use for my android application?
I do not want to spend months to port a rules engine to android.
I am looking for something readymade.

Dani AI

Generated

asked for a ready-made rules engine for Android and noted not wanting to spend months porting one. That constraint is the key filter: either pick a very small, Android-compatible engine you can embed, or keep a full-featured BRE on a server and call it from the app.

For on-device execution look for pure-Java, single-jar engines with minimal reflection and no Java SE-only APIs (those are the usual show-stoppers on Android). Lightweight projects built for embedding are the easiest to try first. For heavy, enterprise engines (Drools and the like) plan on running them server-side unless the project explicitly supports Android; those engines often pull in APIs that break on Dalvik/ART and bloat your APK.

If you want to avoid porting and keep rules manageable, the fastest paths are:

  • Embed a small rules interpreter or "rules-as-data" evaluator (JSON or simple DSL) inside the app. This lets you push rule updates as data and requires only a tiny evaluator on the device.
  • Host the full BRE on a backend and expose a REST endpoint. This reuses existing engines unchanged and centralizes rule updates, at the cost of needing connectivity and authorization.

Practical tips:

  • Prototype by dropping the candidate JAR into an emulator, exercise all rule paths, and watch logcat for ClassNotFound or NoSuchMethod errors (those indicate incompatible Java APIs).
  • Watch APK size and method count; enable ProGuard/R8 and add necessary keep rules for reflection.
  • If using Java 8 APIs (streams, lambdas), enable desugaring in Gradle so the code runs on older Android runtimes.
  • For frequently changing rules prefer server-side or rules-as-data + remote config to avoid app updates.

As pointed out, BREs exist — choose based on footprint and update needs: embed a tiny evaluator for offline/off-device speed, or run the full BRE on the server to save time and avoid porting.

Hi,

You can use Business Rules Engine (BRE) or RMA for your android applications.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.