Island Configuration (ParamIsland)

The ParamIsland component acts as the control center for the Dynamic Island. It defines the notification’s behavior (priority, timeout, ordering), display properties, and holds the data for the Expanded (BigIslandArea) and Minimized (SmallIslandArea) states.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
builder.setParamIsland(
    // Behavior
    islandPriority = 2,          // Default High Priority
    islandTimeout = 5,           // Auto-dismiss after 5s
    islandOrder = false,         // Queue behavior

    // Config Flags
    dismissIsland = false,       // Should it close immediately?
    maxSize = false,             // Force max expansion?
    needCloseAnimation = true,
    
    // Appearance
    highlightColor = "#FF5722",
    
    // Content Areas (Defined separately)
    bigIslandArea = myBigArea,
    smallIslandArea = mySmallArea,
    
    // Optional Share Config
    shareData = ShareData(
        title = "Song Name",
        content = "Artist",
        pic = "album_art_key",
        shareContent = "Check out this song!"
    )
)

Parameters (ParamIsland)

ParameterTypeDescription
islandPropertyIntGeneral display property. Default is 1.
islandPriorityIntRequired. Determines importance.
2: High (Popup). Default.
0-1: Lower priority/Background.
islandTimeoutInt?Time in milliseconds before the island automatically minimizes or dismisses.
islandOrderBooleanControls queue ordering. false (default) typically implies standard First-In-First-Out behavior.
dismissIslandBooleanIf true, this update command will force the existing island to close immediately.
maxSizeBooleanIf true, forces the island to use the maximum available layout size.
needCloseAnimationBooleanWhether to play the shrink/fade animation when closing. Default true.
expandedTimeInt?Specific duration (ms) to stay in the Expanded state before minimizing.
highlightColorString?Hex color code for accenting specific UI elements within the island. This iclude the color border around the island
bigIslandAreaBigIslandArea?Defines the layout and content for the Expanded state.
smallIslandAreaSmallIslandArea?Defines the layout and content for the Minimized (capsule) state.
shareDataShareData?Configuration for system sharing functionality.

Share Data Configuration

If your notification includes a “Share” action, this object defines the content that gets passed to the Android system share sheet.

Data Model (ShareData)

ParameterTypeDescription
titleStringRequired. The title of the content being shared.
contentStringRequired. The main text body or description.
picStringRequired. Key for the main image thumbnail.
shareContentStringRequired. The actual text/link payload shared to other apps.
sharePicString?Optional alternative image key specifically for the share payload.