App Shortcut & Quick Actions Manager (FREE)

:rocket: App Shortcut & Quick Actions Manager (Extension for App Inventor / Kodular)

:pushpin: Description

App Shortcut & Quick Actions Manager is a lightweight native component for App Inventor and its distributions (Kodular & others.) that enables you to create Dynamic App Shortcuts on the Android home screen.

When users long-press your app icon, they get quick access to key features—such as ā€œScan QRā€, ā€œOpen Chatā€, or ā€œSettingsā€. Built purely on Android’s native ShortcutManager API, it adds no heavy external libraries to your project.

:sparkles: Key Features

  • :high_voltage: Instant Access: Create and remove shortcuts dynamically at runtime.
  • :mobile_phone: Native Integration: Built on official Android 7.1+ APIs (API 25+).
  • :shuffle_tracks_button: Smart Navigation: Retrieve launch Action and Data URI to navigate users directly to specific screens.
  • :shield: Reliable: Features device compatibility checks and error handling.

:brick: Blocks Reference & Parameters

1. call AppShortcut.AddDynamicShortcut

Creates a new dynamic shortcut or updates an existing one.

  • Parameters:
    • id (String) : Unique identifier for the shortcut.
      • Example: "scan_shortcut"
    • shortLabel (String) : Short title displayed in the popup menu (up to 10–12 characters).
      • Example: "Scanner"
    • longLabel (String) : Longer description used when pinned to the home screen.
      • Example: "Open QR Scanner"
    • action (String) : A unique action string used to determine which screen to launch.
      • Example: "open_scanner"
    • dataUri (String) : Extra data or URI scheme (optional, can be left blank "" ).
      • Example: "app://data/123"

2. call AppShortcut.GetStartAction (Function / Returns String)

GetStartAction

Returns the action string that launched the application.

  • Usage: Best called inside when Screen1.Initialize .
  • Return Value: Action string (e.g., "open_scanner" ) or empty string "" if launched normally.

3. call AppShortcut.GetStartData (Function / Returns String)

GetStartData

Returns the extra dataUri string passed when launching via shortcut.

  • Return Value: Data string or "" .

4. call AppShortcut.RemoveDynamicShortcut

RemoveAllDynamicShortcuts

Removes a specific shortcut by its id .

  • Parameters:
    • id (String) : The ID of the shortcut to remove.
      • Example: "scan_shortcut"

5. call AppShortcut.RemoveAllDynamicShortcuts

RemoveDynamicShortcut

Removes all dynamic shortcuts created by the app.

6. AppShortcut.IsSupported (Property / Returns Boolean)

IsSupported

Checks whether the user’s device supports App Shortcuts (Android 7.1 / API 25+).

  • Return Value: true or false .

7. call AppShortcut.GetMaxShortcutCount (Function / Returns Number)

GetMaxShortcutCount

Returns the maximum number of dynamic shortcuts allowed by the system launcher (typically 4).

8. when AppShortcut.ErrorOccurred (Event)

ErrorOccurred

Triggered when an error occurs (e.g., when exceeding maximum shortcut limits).

  • Parameter: message (String) — Error description.

:light_bulb: Blocks Usage Example (Screen Navigation)

Step 1. Registering a Shortcut (e.g., in Screen1.Initialize):

  • id : "shortcut_scan"
  • shortLabel : "Scanner"
  • longLabel : "Open Scanner"
  • action : "open_scanner"
  • dataUri : ""

Step 2. Handling Shortcut Launch in when Screen1.Initialize:

Plaintextif (AppShortcut1.GetStartAction == "open_scanner") then open another screen (screenName: "ScannerScreen")


com.appshortcut.aix (8.3 KB)
Š Š°ŃŃˆŠøŃ€ŠµŠ½ŠøŠµ было созГано с ŠæŠ¾Š¼Š¾Ń‰ŃŒŃŽ: :rocket: FAST

4 Likes