MATMOP Android App (Kotlin + C++)
This minimal Android app loads the included markdown pages from the assets and renders them into a WebView using the CommonMark library. It also includes a tiny native C++ library exposed via JNI as a demonstration of native integration.
How to open and build:
- Open the
androidAppfolder in Android Studio. - Let Android Studio sync Gradle and install any SDK/NDK components it requests.
- Build and run on an emulator or device (minSdk 21).
Build a release App Bundle (AAB) locally:
- Unsigned (for testing):
- In Android Studio: Build > Build Bundle(s)/APK(s) > Build Bundle(s).
- Or from terminal in
androidApp:./gradlew :app:bundleRelease(macOS/Linux) or.\gradlew :app:bundleRelease(Windows PowerShell). - Output:
androidApp/app/build/outputs/bundle/release/app-release.aab.
- Signed (Play upload):
- Enable Play App Signing in Play Console (recommended).
- Create an upload keystore (keep it private):
- Windows PowerShell example:
keytool -genkeypair -v -keystore C:\\path\\to\\your-upload.keystore -alias upload -keyalg RSA -keysize 2048 -validity 36500
- Windows PowerShell example:
- In Android Studio: Build > Generate Signed Bundle / APK… > Android App Bundle.
- Choose the keystore and provide alias/passwords. Android Studio will produce a signed AAB suitable for upload.
- Alternatively, set these properties locally in
androidApp/gradle.properties(do NOT commit real secrets): RELEASE_STORE_FILE=\path\to\your-upload.keystore RELEASE_STORE_PASSWORD=*** RELEASE_KEY_ALIAS=upload RELEASE_KEY_PASSWORD=*** Then run:app:bundleReleaseto produce a signed AAB.
CI build (GitHub Actions):
- A workflow is provided at
.github/workflows/android_build_aab.ymltriggered on pushes tomasteror via manual dispatch. It uploadsapp-release.aabas an artifact. - By default this artifact is unsigned. To enable signing in CI, add repository secrets for the keystore and wire them as Gradle properties.
Notes:
- The project includes
app/CMakeLists.txtand a simple native implementation inapp/src/main/cpp/native-lib.cpp. - Target/compile SDK 34; Play-ready manifest includes
android:exportedand adaptive icons.