This is a project that add the ability to call specific Platform Functions
.
Web demo: https://axnh.netlify.app/
These are the new files that you need:
- /Platform
- /proj.android/app/src/org/axmol/platform/PlatformDelegate.java
- /proj.android/app/src/org/axmol/app/MainApplication.java
There are some small changes that you need do to your project to include this.
1 - Add platform directory:
add_subdirectory(Platform)
2 - Add emscripten code for embind:
if (WASM)
target_link_libraries(${APP_NAME} "embind")
set_target_properties(${APP_NAME} PROPERTIES LINK_FLAGS "--bind")
endif()
1 - Include config file:
#include "common/PlatformHelperConfig.hpp"
You need this if you will use application/activity context for some UI library or SDK.
1 - proj.android/app/AndroidManifest.xml:
<application android:name="org.axmol.app.MainApplication"
[...]
2 - proj.android/app/build.gradle:
implementation 'androidx.annotation:annotation:1.8.0'