Listen for preset loaded events#

Starting from v3.82 Kustom sends a broadcast when a preset finishes loading. This allows external apps like Tasker to react to preset changes.

Broadcast Action#

org.kustom.action.PRESET_LOADED

Extras#

ExtraTypeDescription
org.kustom.extra.SPACE_IDStringSpace URI (e.g. kspace://klwp/0, kspace://kwgt/123)
org.kustom.extra.PRESET_TITLEStringPreset title
org.kustom.extra.EXTERNALBooleanTrue if loaded via external request (Tasker, shortcut)

Tasker Example#

  1. Create a new Profile with Event > Intent Received
  2. Set Action to org.kustom.action.PRESET_LOADED
  3. In your Task, use %space_id, %preset_title, and %external variables

Android Code Example#

BroadcastReceiver receiver = new BroadcastReceiver() {
    @Override
    public void onReceive(Context context, Intent intent) {
        String spaceId = intent.getStringExtra("org.kustom.extra.SPACE_ID");
        String title = intent.getStringExtra("org.kustom.extra.PRESET_TITLE");
        boolean external = intent.getBooleanExtra("org.kustom.extra.EXTERNAL", false);
    }
};

IntentFilter filter = new IntentFilter("org.kustom.action.PRESET_LOADED");
context.registerReceiver(receiver, filter);