Skip to content
Ludens Ludens Ludens 0.3.0

Android Configuration

This content is for the 0.1.0 version. Switch to the latest version for up-to-date documentation.

All application identity and build properties are managed through gradle.properties in the project root. No Kotlin code changes are required for basic customization.

Edit the gradle.properties file in the project root:

# Unique application identifier (reverse domain format)
ludens.applicationId=com.yourorganization.sample
# Version visible to the user
ludens.applicationVersion=1.0
# Application name displayed in system settings
ludens.applicationName=Game Name
# Short name displayed under the home screen icon
ludens.applicationLauncherName=Game

Modifying project properties to customize ID, version, and name.

PropertyFormatDescription
ludens.applicationIdcom.domain.nameUnique identifier for the app. Must be unique on the Play Store.
ludens.applicationVersionx.y (e.g., 1.0)User-visible version string.
ludens.applicationNameFree textFull application name shown in system settings.
ludens.applicationLauncherNameShort textName displayed under the home screen icon.

Replace the default icon by updating the images in composeApp/src/androidMain/res/mipmap-* directories, or use the Image Asset Studio tool in Android Studio:

  1. Right-click on composeApp/src/androidMain/res.
  2. Select New > Image Asset.
  3. Configure the icon using your game’s artwork.

Using Image Asset Studio to update the application icon.

The mipmap-* directories contain icons at different resolutions:

DirectoryResolution
mipmap-mdpi48×48 px
mipmap-hdpi72×72 px
mipmap-xhdpi96×96 px
mipmap-xxhdpi144×144 px
mipmap-xxxhdpi192×192 px

For release builds, you need a signing keystore. Create a keystore.properties file in the project root using the provided template:

storePassword=your_store_password
keyPassword=your_key_password
keyAlias=your_alias
storeFile=C:/Path/To/Your/key.jks

A keystore.properties.template file is included in the repository for reference.

For more advanced configuration beyond what gradle.properties offers, you can directly edit the AndroidManifest.xml file.

The manifest file is located at: composeApp/src/androidMain/AndroidManifest.xml

By default, Ludens forces the application into landscape mode using sensorLandscape. This ensures the game rotates according to the device sensor but stays in a horizontal orientation.

To change this, locate the <activity> tag in your manifest and modify the android:screenOrientation attribute.

ValueBehavior
sensorLandscape(Default) Landscape only, auto-rotates between left and right landscape based on sensor.
sensorPortraitPortrait only, auto-rotates between normal and upside-down portrait based on sensor.
landscapeFixed landscape orientation (ignoring sensor).
portraitFixed portrait orientation (ignoring sensor).
fullSensorAllows rotation to any of the 4 orientations.

Example for a portrait game:

<activity
android:exported="true"
android:screenOrientation="sensorPortrait"
android:configChanges="orientation|screenSize"
android:name=".MainActivity"
android:label="@string/app_launcher_name">
...
</activity>

If your RPG Maker plugins require access to device hardware (like the camera, microphone, or internet access), you must declare those permissions in the manifest. Ludens does not enforce any specific permissions by default to keep the app as privacy-friendly as possible.

For example, if your game features an AR (Augmented Reality) mini-game plugin, you will need the CAMERA permission. Or if your game fetches highscores from an online leaderboard, you will need INTERNET.

Add the <uses-permission> tag as a direct child of the <manifest> element (outside the <application> tag).

Example: Adding Microphone permission:

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Add new permissions here -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<application>
...
</application>
</manifest>

By default, the manifest includes android:allowBackup="true". This allows Android’s built-in backup service to back up your app’s data to the user’s Google Drive.

If your game contains sensitive data or if you want to opt out of the auto-backup system, you can change this to false.

<application
android:allowBackup="false"
... >