I did something like this a long time ago.
It was not Android related, but it was agnostic.
I used sockets to communicate with Prolog. The prologue will read input, do its job and return a response. Another application (in my experience) used C ++ and OpenGL , and it worked very well.
Using sockets in Android should not be your problem. Unfortunately, this was many years ago, and I do not believe that I have the Prolog source code to show you how to do this, but one option: use sockets :)
Good luck (I will try to find this source code, but I do not expect to find it!)
Pedro loureiro
source share