Package 

Interface PermutiveApi

  • All Implemented Interfaces:
    com.permutive.android.PermutiveSdk , java.io.Closeable , java.lang.AutoCloseable

    
    public interface PermutiveApi
     implements PermutiveSdk, Closeable
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • setIdentity

         abstract Unit setIdentity(String identity, Integer priority, Date expiry)

        Associate an alias with the current user. Forces segments and queries to be updated with the associated identity, if there is one on the server. Aliases will be deleted when their expiry is in the past.

        Parameters:
        identity - An unique identifier of the user.
        priority - The priority of the alias, where 0 is the highest and Alias.LOWEST_PRIORITY is the lowest (Default: Alias.LOWEST_PRIORITY)
        expiry - The expiry time and date of the alias or Alias.NEVER_EXPIRE if it never expires (Default: Alias.NEVER_EXPIRE)
      • setIdentity

         abstract Unit setIdentity(String identity)

        Associate an alias with the current user with lowest priority that never expires. Forces segments and queries to be updated with the associated identity, if there is one on the server.

        Parameters:
        identity - An unique identifier of the user.
      • setIdentity

         abstract Unit setIdentity(List<Alias> aliases)

        Associate an list of aliases with the current user. Aliases are resolved in the order given. Forces segments and queries to be updated with the associated identity, if there is one on the server.

        Parameters:
        aliases - A list of aliases to use to identify the user.
      • setTitle

        @Deprecated(message = "Please use the PageTracker api to track page title.") abstract Unit setTitle(String title)

        Set the title context, used when tracking events.

      • setUrl

        @Deprecated(message = "Please use the PageTracker api to track page url.") abstract Unit setUrl(Uri url)

        Set the url context, used when tracking events.

      • setReferrer

        @Deprecated(message = "Please use the PageTracker api to track page referrer.") abstract Unit setReferrer(Uri referrer)

        Set the referrer context, used when tracking events.

      • trackPage

        @CheckResult() abstract PageTracker trackPage(EventProperties eventProperties, String title, Uri url, Uri referrer)

        Create a page tracker object with the given context & properties. A PageTracker object will automatically track a Pageview and PageviewComplete events upon creation and closing of the PageTracker object.

        You should retain the PageTracker object until the page has finished viewing, and then call close once completed.

      • createVideoTracker

         abstract MediaTracker createVideoTracker(Long duration, EventProperties eventProperties, String title, Uri url, Uri referrer)

        Create a Media Tracker object for tracking user interaction with video content. A Videoview event will be tracked on creation of the MediaTracker.

        Parameters:
        duration - The duration of the video in milliseconds.
        eventProperties - The event properties to be tracked with the initial Videoview event and the VideoCompletion event.
        title - The video title (default value null)
        url - The url of the video (default value null)
        referrer - The referring url of the video (default value null)
      • setDeveloperMode

         abstract Unit setDeveloperMode(Boolean enable)

        Enable/disable developer mode which will log more information to the console.

      • clearPersistentData

         abstract Unit clearPersistentData(Function0<Unit> onSuccess, Function1<Throwable, Unit> onFailure)

        Clear all persistent data of the current Permutive instance. Callbacks will run on the main thread.

        Parameters:
        onSuccess - Callback which is called on successful deletion
        onFailure - Callback which is called when deletion fails