Skip to content

Project Configuration

aaalllexxx edited this page Jun 29, 2026 · 1 revision

enpaf.json Configuration

enpaf.json is the single source of truth for your project's metadata, Android manifest, permissions, hardware features, deep links, Python dependencies, theme, and signing. It's read by EnpafApp at runtime and by the builder at build time.

Full example

{
    "name": "My App",
    "package": "com.acme.myapp",
    "version": "1.0.0",
    "description": "My ENPAF Application",
    "author": "Developer",
    "orientation": "portrait",
    "icon": "icon.png",
    "min_sdk": 24,
    "target_sdk": 34,
    "python_version": "3.11",
    "python_requirements": [],
    "permissions": [
        "INTERNET",
        "CAMERA",
        "VIBRATE",
        "POST_NOTIFICATIONS",
        "NFC",
        "FINE_LOCATION",
        "RECORD_AUDIO",
        "BLUETOOTH",
        "BLUETOOTH_SCAN",
        "BLUETOOTH_CONNECT",
        "ACCESS_WIFI_STATE",
        "ACCESS_NETWORK_STATE"
    ],
    "features": [
        { "key": "NFC", "required": false },
        { "key": "CAMERA", "required": false }
    ],
    "deeplinks": [
        {
            "label": "Open App",
            "scheme": "myapp",
            "host": "open",
            "path": "",
            "pathType": "path",
            "autoVerify": false
        }
    ],
    "theme": {
        "primary_color": "#000000",
        "status_bar_color": "#000000"
    },
    "build_config": {
        "minify": false,
        "shrink_resources": false
    },
    "signing": {
        "keystore": "release.jks",
        "store_password": "********",
        "key_alias": "myapp",
        "key_password": "********"
    }
}

Field reference

Identity

Field Type Default Notes
name string Human-readable app name (shown under the launcher icon). Required.
package string Android application id, reverse-DNS (e.g. com.acme.app). Required, immutable once published.
version string 1.0.0 App version; used in the APK file name and manifest.
description string Short description.
author string Author/owner.
icon string Path (relative to the project) to the launcher icon, e.g. icon.png/icon.jpg.

Display

Field Type Default Notes
orientation string portrait portrait, landscape, or auto.
theme.primary_color string Hex color for the app theme.
theme.status_bar_color string Hex color for the status bar.

SDK / Python

Field Type Default Notes
min_sdk int 24 Minimum Android API level.
target_sdk int 34 Target Android API level.
python_version string builder default Chaquopy Python version (e.g. "3.11").
python_requirements string[] [] Pip packages to bundle into the APK (e.g. ["requests", "pillow"]). These are installed by Chaquopy at build time. See the note below.

Bundled Python deps: anything in python_requirements is available on-device. But framework modules that are packaged into every APK must not import a third-party library at module top level — keep such imports lazy (inside the function that needs them) or the app crashes on launch with ModuleNotFoundError. See Architecture and Troubleshooting.

Permissions

Field Type Notes
permissions string[] Short permission names that map to android.permission.*.

Use short names; ENPAF expands them. Common values:

INTERNET, CAMERA, RECORD_AUDIO, VIBRATE, NFC, FINE_LOCATION, COARSE_LOCATION, ACCESS_BACKGROUND_LOCATION, BLUETOOTH, BLUETOOTH_ADMIN, BLUETOOTH_SCAN, BLUETOOTH_CONNECT, ACCESS_WIFI_STATE, CHANGE_WIFI_STATE, ACCESS_NETWORK_STATE, POST_NOTIFICATIONS, USE_BIOMETRIC, USE_FINGERPRINT, READ_MEDIA_IMAGES, READ_MEDIA_VIDEO, READ_MEDIA_AUDIO, REQUEST_INSTALL_PACKAGES.

Dangerous permissions (camera, location, audio, etc.) still need a runtime request — see Device Capabilities → Permissions.

Hardware features

Field Type Notes
features object[] { "key": "<FEATURE>", "required": <bool> }.

Declares <uses-feature> entries. required: false lets the app install on devices that lack the feature (then check at runtime). Example keys: NFC, CAMERA, CAMERA_FRONT, CAMERA_AUTOFOCUS, GYROSCOPE, ACCELEROMETER.

Deep links

Field Type Notes
deeplinks object[] Each maps to an <intent-filter>.

Per entry:

Key Notes
label Human label.
scheme URI scheme (e.g. myapp, https).
host Host to match (may be empty).
path Path to match.
pathType path, prefix, or pattern.
autoVerify true for Android App Links verification.

Build config & signing

Field Type Default Notes
build_config.minify bool false Enable R8 code shrinking. Leave off unless you know your Python/JNI deps survive it.
build_config.shrink_resources bool false Shrink unused resources.
signing.keystore string auto Path to a .jks/.keystore.
signing.store_password string enpaf123 Keystore password.
signing.key_alias string enpaf Key alias.
signing.key_password string = store_password Key password.

If you don't provide signing, release builds use an auto-generated keystore kept at ~/.enpaf/keystores/<package>.jks. Full details and how to ship a consistent signing key: Release & Signing.

Misc

Field Type Default Notes
log_level string INFO Python logging level (DEBUG, INFO, WARNING, …).

Clone this wiki locally