• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Android extension calling another application

H

haza

Guest
Hi,
I'm trying to make an android extension that calls the stockfish chess engine from java.
https://stockfishchess.org/download/

With eclipse I can call the stockfish pc engine through java and it works fine. However I am having trouble making the game maker java android extension.
I need to call the stockfish-8-armeabi-v7a engine and I use the following type of call in java

engineProcess = Runtime.getRuntime().exec(PATH);
with path set to
private static final String PATH = "../stockfish-8-armeabi-v7a"; I've tried without the ../

I try to use include file and include extension file for the stockfish-8-armeabi-v7a when I make the APK but the call always fails at runtime.

Is it even possible what I am trying to do in the extension or am i just doing something wrong?
 
W

Wraithious

Guest
What is the error you are getting say? If it runs without crashing and you see something like "cant find argfree method on extension class:null" in the runner log then its probably an error with not attatching the jnirunner lib to your statement, if the project fails to build cbeck the lint report via the link given in the compile log to see what is going wrong. If you're new to extensions do what I did and download a bunch of them and look at the java source files to see what they did. Most of the time it's errors in not using or putting "runnerActivity.currentActuvity..." where it should be placed, one thing I've learned is that anywhere you see the word- 'this' or the reference to the class you replace it with the runner activity call.
 
H

haza

Guest
Thank you so much for your reply. Where exactly did you download the java extension examples?
 
W

Wraithious

Guest
I downloaded them off the marketplace, I started with some free ones like amazon add extension and some others, and a couple of low priced ones that i needed anyway like the add images from gallery extension and the audio spectrum analizer. Once you dow load some just import them into a new project and right click the extension and open in explorer, then go to the android source folder and open the java file with notepad++ so you can analize them
 
Top