Skip to content
Ludens Ludens Ludens 0.3.0

Android Configuration

Android-specific application identity and manifest properties are managed through ludens.properties in the project root. This system allows you to customize your app without touching Kotlin code or complex build scripts.

These properties define the package name, version, and names shown by the Android system.

# ----- Android Identity -----
ludens.android.id=com.ludens.compose.ludens
ludens.android.version=0.3.0
ludens.android.versionCode=1
ludens.android.name=Ludens
ludens.android.launcherName=Ludens
ludens.android.minSDK=21
ludens.android.targetSDK=36
ludens.android.immersive=true

Configure these properties using the ludens.android.* prefix:

PropertyTypeDefaultDescription
idStringcom.ludens.compose.ludensUnique application identifier (package name).
versionString0.3.0Visible version name shown to the user.
versionCodeInteger1Internal version code used for Play Store updates.
nameStringLudensFull application name in system settings.
launcherNameStringLudensName displayed under the home screen icon.
minSDKInteger21Minimum Android API level supported.
targetSDKInteger36Target Android API level for the build.
immersiveBooleantrueEnables immersive mode (hides system bars).

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

Ludens automatically generates the AndroidManifest.xml based on these properties. This allows for safe and predictable manifest management.

# ----- Android Manifest -----
ludens.android.manifest.allowBackup=true
ludens.android.manifest.largeHeap=true
ludens.android.manifest.hardwareAccelerated=true
ludens.android.manifest.screenOrientation=sensorLandscape
ludens.android.manifest.usesCleartextTraffic=false
ludens.android.manifest.resizeableActivity=false

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, modify the ludens.android.manifest.screenOrientation property.

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.

Configure these properties using the ludens.android.manifest.* prefix:

PropertyTypeMappingDescription
allowBackupBooleanandroid:allowBackupWhether Android can back up app data to Google Drive.
largeHeapBooleanandroid:largeHeapRequests a larger heap for memory intensive games.
hardwareAcceleratedBooleanandroid:hardwareAcceleratedEnables GPU acceleration for the UI.
screenOrientationStringandroid:screenOrientationDefines the display orientation (see table above).
usesCleartextTrafficBooleanandroid:usesCleartextTrafficAllows cleartext HTTP traffic (Not recommended).
resizeableActivityBooleanandroid:resizeableActivityAllows the activity to be resized by the system.

If your RPG Maker plugins require access to device hardware or network services, you must declare those permissions. Ludens makes this easy with built-in toggles.

For example, if your game fetches highscores from an online leaderboard, you will need the internet permission. If your game should prevent the screen from turning off during long cutscenes, use the wakeLockpermission.

# ----- Android Permissions -----
ludens.android.permissions.internet=false
ludens.android.permissions.networkState=false
ludens.android.permissions.wakeLock=false
ludens.android.permissions.accessWifiState=false
ludens.android.permissions.changeWifiState=false

Declare these permissions under the ludens.android.permissions.* prefix:

PropertyTypeMappingDescription
internetBooleanINTERNETGrants network access for online features.
networkStateBooleanACCESS_NETWORK_STATEAccess to connectivity and network type info.
wakeLockBooleanWAKE_LOCKKeeps the CPU awake while rendering or playing.
accessWifiStateBooleanACCESS_WIFI_STATEGrants access to Wi-Fi connection state.
changeWifiStateBooleanCHANGE_WIFI_STATEPermission to change Wi-Fi connectivity.

For configurations not covered by ludens.properties, edit the manifest directly at: composeApp/src/androidMain/AndroidManifest.xml

If your plugins require hardware access like the Camera or Microphone, add the <uses-permission> tag as a direct child of the <manifest> element.

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>

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

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