Package 

Class HolochainServiceAppClient

    • Constructor Detail

      • HolochainServiceAppClient

        HolochainServiceAppClient(Activity activity, ComponentName serviceComponentName)
    • Method Detail

      • connect

         final Unit connect(String installedAppId)

        Connects to the Holochain service using the App API for a specific app.

        Parameters:
        installedAppId - The ID of the app to connect to
      • setupApp

         final AppAuthFfi setupApp(InstallAppPayloadFfi installAppPayload, Boolean enableAfterInstall)

        Complete process to setup a Holochain app.

        This method will:

        • Check if the app is installed

        • If not installed, install it

        • Optionally enable it

        • Ensure there is an app websocket available for it

        If an app is already installed, it will not be enabled automatically. It is only enabled after a successful install. The reasoning is that if an app is disabled after initial installation,

        Parameters:
        installAppPayload - The payload containing app installation data
        enableAfterInstall - Whether to enable the app after installation
      • connectSetupApp

         final AppAuthFfi connectSetupApp(InstallAppPayloadFfi installAppPayload, Boolean enableAfterInstall)

        Connects to service, waits for connection to be ready, and sets up an app.

        Convenience method that combines connect(), waitForConnectReady(), and setupApp() into a single call.

        Parameters:
        installAppPayload - The payload containing app installation data
        enableAfterInstall - Whether to enable the app after installation
      • enableApp

         final AppInfoFfi enableApp(String installedAppId)

        Enables an installed Holochain app.

        Parameters:
        installedAppId - The ID of the app to enable