How to make an OEX app for android?

Discussion of chess software programming and technical issues.

Moderator: Ras

asanjuan
Posts: 214
Joined: Thu Sep 01, 2011 5:38 pm
Location: Seville, Spain

How to make an OEX app for android?

Post by asanjuan »

Hi everyone.

I'm back in business doing some little things (small tweaks) in my engine, Rhetoric. I'm finding out that the new standards have changed a lot since i left the project aside (back in 2017).
To my surprise, I can't install my arm compile in my new Android phone, and I've read that it has to be published in an "OEX app".
I'm pretty sure someone has asked this here time ago, but I wonder what are the steps to make that compile.

Can anyone help me? A simple checklist would be great. An example with code and instructions woud be even better :D

Thanks in advance.
Alberto.
Still learning how to play chess...
knigths move in "L" shape ¿right?
User avatar
flok
Posts: 558
Joined: Tue Jul 03, 2018 10:19 am
Full name: Folkert van Heusden

Re: How to make an OEX app for android?

Post by flok »

asanjuan wrote: Wed Nov 16, 2022 3:06 pm Hi everyone.

I'm back in business doing some little things (small tweaks) in my engine, Rhetoric. I'm finding out that the new standards have changed a lot since i left the project aside (back in 2017).
To my surprise, I can't install my arm compile in my new Android phone, and I've read that it has to be published in an "OEX app".
I'm pretty sure someone has asked this here time ago, but I wonder what are the steps to make that compile.

Can anyone help me? A simple checklist would be great. An example with code and instructions woud be even better :D

Thanks in advance.
Alberto.
I found it to be problematic.

What you need to do is: compile your binary and then rename it to myprogram.so so that it looks like a library. Yes. Then there's a java-wrapper which is included in e.g. https://github.com/c4akarl/StockfishChess

Why it is problematic? I could run the result in the emulator as well as in my phone but if I upload it to playstore, then it won't work anymore (https://play.google.com/store/apps/deta ... eusden.dog).
User avatar
Fabio Gobbato
Posts: 219
Joined: Fri Apr 11, 2014 10:45 am
Full name: Fabio Gobbato

Re: How to make an OEX app for android?

Post by Fabio Gobbato »

asanjuan wrote: Wed Nov 16, 2022 3:06 pm Hi everyone.

I'm back in business doing some little things (small tweaks) in my engine, Rhetoric. I'm finding out that the new standards have changed a lot since i left the project aside (back in 2017).
To my surprise, I can't install my arm compile in my new Android phone, and I've read that it has to be published in an "OEX app".
I'm pretty sure someone has asked this here time ago, but I wonder what are the steps to make that compile.

Can anyone help me? A simple checklist would be great. An example with code and instructions woud be even better :D

Thanks in advance.
Alberto.
It seems not a simple task as before. You can have a look at others engine for example: https://github.com/peterosterlund2/texelapp
Archimedes
Posts: 167
Joined: Tue Mar 05, 2019 3:43 pm
Full name: Archimedes

Re: How to make an OEX app for android?

Post by Archimedes »

https://sourceforge.net/p/chess-engines ... wiki/home/

There you will find a current project directory for Texel as an attachment. This project is based on the chess engine support library for Android from https://github.com/gkalab/chessenginesupport-androidlib and has been adapted to the latest version of Android Studio. The project should work without any issues on newer versions of Android Studio.

Assuming, you want to distribute Texel as your own APK file, change the string „yourname“ to your own name in the following files:

Code: Select all

texelChessEngine\build.gradle
texelChessEngine\src\main\AndroidManifest.xml
texelChessEngine\src\main\java\org\yourname\chess\texel\MainActivity.java
texelChessEngine\src\main\java\org\yourname\chess\texel\TexelProvider.java
Finally, change the directory „texelChessEngine\src\main\java\org\yourname\“ to your own name.

Do this job, before you load the project into Android Studio. :wink:

Load the project into Android Studio and generate a signed APK file. :D

If you have a new version of Texel, just copy the native chess engines to the directory in
„texelChessEngine\src\main\jniLibs“, rename the files to libtexel.so and change the version nunber for Texel in the following files:

Code: Select all

texelChessEngine\src\main\AndroidManifest.xml
texelChessEngine\src\main\res\xml\enginelist.xml
User avatar
Fabio Gobbato
Posts: 219
Joined: Fri Apr 11, 2014 10:45 am
Full name: Fabio Gobbato

Re: How to make an OEX app for android?

Post by Fabio Gobbato »

Archimedes wrote: Thu Nov 17, 2022 10:57 am https://sourceforge.net/p/chess-engines ... wiki/home/

There you will find a current project directory for Texel as an attachment. This project is based on the chess engine support library for Android from https://github.com/gkalab/chessenginesupport-androidlib and has been adapted to the latest version of Android Studio. The project should work without any issues on newer versions of Android Studio.

Assuming, you want to distribute Texel as your own APK file, change the string „yourname“ to your own name in the following files:

Code: Select all

texelChessEngine\build.gradle
texelChessEngine\src\main\AndroidManifest.xml
texelChessEngine\src\main\java\org\yourname\chess\texel\MainActivity.java
texelChessEngine\src\main\java\org\yourname\chess\texel\TexelProvider.java
Finally, change the directory „texelChessEngine\src\main\java\org\yourname\“ to your own name.

Do this job, before you load the project into Android Studio. :wink:

Load the project into Android Studio and generate a signed APK file. :D

If you have a new version of Texel, just copy the native chess engines to the directory in
„texelChessEngine\src\main\jniLibs“, rename the files to libtexel.so and change the version nunber for Texel in the following files:

Code: Select all

texelChessEngine\src\main\AndroidManifest.xml
texelChessEngine\src\main\res\xml\enginelist.xml
Wow wonderful work! Can chess engine support library for Android be used also by commercial engines?
Archimedes
Posts: 167
Joined: Tue Mar 05, 2019 3:43 pm
Full name: Archimedes

Re: How to make an OEX app for android?

Post by Archimedes »

Fabio Gobbato wrote: Thu Nov 17, 2022 5:25 pmCan chess engine support library for Android be used also by commercial engines?
It seems that the project has its roots here:
https://code.google.com/archive/p/chess ... ndroidlib/.

The original project was released under the Apache license 2.0. So I would say, yes.
asanjuan
Posts: 214
Joined: Thu Sep 01, 2011 5:38 pm
Location: Seville, Spain

Re: How to make an OEX app for android?

Post by asanjuan »

Archimedes wrote: Thu Nov 17, 2022 10:57 am https://sourceforge.net/p/chess-engines ... wiki/home/

There you will find a current project directory for Texel as an attachment. This project is based on the chess engine support library for Android from https://github.com/gkalab/chessenginesupport-androidlib and has been adapted to the latest version of Android Studio. The project should work without any issues on newer versions of Android Studio.

Assuming, you want to distribute Texel as your own APK file, change the string „yourname“ to your own name in the following files:

Code: Select all

texelChessEngine\build.gradle
texelChessEngine\src\main\AndroidManifest.xml
texelChessEngine\src\main\java\org\yourname\chess\texel\MainActivity.java
texelChessEngine\src\main\java\org\yourname\chess\texel\TexelProvider.java
Finally, change the directory „texelChessEngine\src\main\java\org\yourname\“ to your own name.

Do this job, before you load the project into Android Studio. :wink:

Load the project into Android Studio and generate a signed APK file. :D

If you have a new version of Texel, just copy the native chess engines to the directory in
„texelChessEngine\src\main\jniLibs“, rename the files to libtexel.so and change the version nunber for Texel in the following files:

Code: Select all

texelChessEngine\src\main\AndroidManifest.xml
texelChessEngine\src\main\res\xml\enginelist.xml
Thank you so much!
Pretty clear! I'll try to follow your advice this weekend.
Still learning how to play chess...
knigths move in "L" shape ¿right?
User avatar
flok
Posts: 558
Joined: Tue Jul 03, 2018 10:19 am
Full name: Folkert van Heusden

.so files missing from published .aab file

Post by flok »