Package com.swrve.sdk

Class SwrveSDK

    • Constructor Detail

      • SwrveSDK

        public SwrveSDK()
    • Method Detail

      • createInstance

        public static ISwrve createInstance​(android.app.Application application,
                                            int appId,
                                            java.lang.String apiKey)
        Create a single Swrve SDK instance.
        Parameters:
        application - your application context
        appId - your app id in the Swrve dashboard
        apiKey - your app api_key in the Swrve dashboard
        Returns:
        singleton SDK instance.
      • createInstance

        public static ISwrve createInstance​(android.app.Application application,
                                            int appId,
                                            java.lang.String apiKey,
                                            SwrveConfig config)
        Create a single Swrve SDK instance.
        Parameters:
        application - your application context
        appId - your app id in the Swrve dashboard
        apiKey - your app api_key in the Swrve dashboard
        config - your SwrveConfig options
        Returns:
        singleton SDK instance.
      • getConfig

        public static SwrveConfig getConfig()
        Returns the Swrve configuration that was used to initialize the SDK.
        Returns:
        configuration used to context the SDK
      • setSilentPushListener

        public static void setSilentPushListener​(com.swrve.sdk.SwrveSilentPushListener silentPushListener)
        Set the silent push listener.
        Parameters:
        silentPushListener - silent push listener
      • sendPushEngagedEvent

        public static void sendPushEngagedEvent​(android.content.Context context,
                                                java.lang.String pushId)
        Called to send the push engaged event to Swrve.
        Parameters:
        context - android context
        pushId - The push id for engagement
      • setRegistrationId

        public static void setRegistrationId​(java.lang.String registrationId)
        Update the Huawei registrationId.
        Parameters:
        registrationId - Updated registration Id