Skip to content
CLIPS for Android
C Java Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
ClipsAndroid Applying last Class hierarchy changes from my 0.4 CLIPSJNI version (h… May 3, 2014
examples
README.rst
slides_es.html
stack_error.sh

README.rst

CLIPS4Android

CLIPS4Android is a project created to adapt CLIPS to Android (I know, too obvious).

The project is organized as follows:

ClipsAndroid
It is an Android library which is intended to be used by other Android applications. To compile the eclipse project, it is necessary to compile CLIPS for Android first (see Compiling CLIPS for Android.).
Examples

It contains different Android applications which use ClipsAndroid:

Compiling CLIPS for Android

Follow the following steps to compile CLIPS for Android:

  1. Install the NDK
  2. Go to the jni folder
  3. Run ndk-build [*]
[*]Providing you have added it to your PATH.

Debugging CLIPS on Android

The cleanest way to show messages from a native library in Android is by simply redirecting its output (see Redirecting stdout). However, this method has not always work for me (sorry, I don't know the cause). That's why I forced CLIPS to show all its messages using Logcat (see Logcat from native code).

Redirecting stdout

CLIPS may throw system exits. As a result, the Android process using CLIPS can unexpectedly crash without giving any useful information. To show CLIPS' original error messages, redirect NDK's standard output to LogCat using the following commands:

$ adb shell stop
$ adb shell setprop log.redirect-stdio true
$ adb shell start

Logcat from native code

Sometimes the previous property does not work (I don't know why yet). Since messages can be directly logged on Logcat, we replaced the printf's with these Logcat's logs in the issue 2 .

To that end, we have done an utility macro. Common usage:

#include "logcat.h"

...

aprintf("This is an standard message\n");

License

CLIPS's source files remain licensed in the public domain.

The rest of the parts of this project will be licensed also as public domain unless the contrary is stated.

Acknowledgements

The development of the ClipsAndroid library was possible thanks to the work done in the CLIPSJNI project.

Besides, this project is supported or has been supported by the THOFU R&D project (project grant CEN-20101019). THOFU was funded by the Spanish Centro para el Desarrollo Tecnológico Industrial (CDTI) and supported by the Spanish Ministerio de Economía y Competitividad.

Something went wrong with that request. Please try again.