Package 

Object DebugStateProvider


  • 
    public class DebugStateProvider
    
                        

    Singleton state holder for debug information. All SDK components report their state to this provider, which then exposes it as a Flow for the debug UI to consume.

    This object is thread-safe.

    • Method Detail

      • init

         final Unit init(Boolean enabled)

        Initializes the state provider. Must be called from AppStackAttributionSdk.init.

        Parameters:
        enabled - Whether debug mode is active.
      • update

         final Unit update(String key, Object value)

        Update a key-value pair in the debug data map. If debug mode is disabled, this method does nothing. If the value is null, the key is removed.

        Parameters:
        key - The key for the debug entry (e.g., "SDK Version").
        value - The value to display (e.g., "1.0.0").
      • now

         final String now()

        Returns a timestamp string formatted as HH:mm:ss.

      • getEventLines

         final Flow<List<String>> getEventLines()

        A flow emitting individual event log lines so that the overlay can render them separately.