raymob is a simple implementation of raylib for Android.
You will need SDK API 33.0.0 and NDK r21 (or higher, compatible with CMake 3.22.1).
If you already have this version of SDK and NDK without having Android Studio, you should still be able to compile the project using gradlew.bat
for Windows or gradlew
for Linux or MacOS.
- Open the
gradle.properties
file and fill in the necessary values for your application, such as the app name, package name, version, etc. - That's it! You can start coding your raylib app in the
app/src/main/cpp
directory!
Note: Do not modify the instances of com.raylib.raymob
and raymob
as they will be automatically replaced during compilation with the information provided in gradle.properties
.
By default, the raymob template targets APIs 24 to 33, which corresponds from Android 7.0 to Android 13 (so 96.2% of devices according to apilevels.com). You can also adapt it to target other API versions if necessary.
This project is fully C/C++ compatible for the logical part with raylib and you can also customize the Java part to your wishes.
In this project you will find a header file raymob.h
that can be used as a replacement for raylib.h
and adds new functionalities that can be enabled through gradle.properties
.
These include the software keyboard, vibration, and accelerometer of the device. You can check the header file raymob.h if you need additional Android-related features that raylib does not support.
These new functions also simplify the process of calling static and non-static public methods of your Java class NativeLoader
from your C/C++ code.
- AdMob Integration in raymob: Gist demonstrating the integration of AdMob in raymob.
If you believe that your repositories or gists related to raymob can be beneficial to others, please feel free to reach out to me or open a pull request to have them added here. I welcome contributions and collaborations to enhance the raymob project and make it more valuable for the community.
You can also contribute to the project by reporting issues, suggesting improvements, or helping to document the project. Your input is highly appreciated!
If you have any questions or encounter problems when using this implementation, please do not hesitate to ask for help by submitting an issue on this repository, this may help other users.