Class DeepLinkingTarget<E extends com.zendesk.sdk.deeplinking.targets.TargetConfiguration>

  • Type Parameters:
    E - The type of the configuration, used to initialize a target activity
    Direct Known Subclasses:
    DeepLinkingTargetArticle, DeepLinkingTargetRequest


    public abstract class DeepLinkingTarget<E extends com.zendesk.sdk.deeplinking.targets.TargetConfiguration>
    extends java.lang.Object
    This is the base class of an deep linking target, containing all needed base features.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean execute(Context context, Intent intent)
      Open a distinct pre-configured distinct view of the SDK.
      static DeepLinkType getDeepLinkType(Intent intent)
      Static helper method to determine which DeepLinkType the given intent describes
      Intent getIntent(Context context, E configuration)
      Method for retrieving a pre-configured Intent to open a distinct view of the SDK.
      Intent getIntent(Context context, E configuration, java.lang.String zendeskUrl, java.lang.String applicationId, java.lang.String oauthClientId)
      Method for retrieving a pre-configured Intent to open a distinct view of the SDK.
      protected static TaskStackBuilder getTaskStackBuilder(Context context, java.util.List<Intent> backStackActivities)
      Create and configure a TaskStackBuilder
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DeepLinkingTarget

        public DeepLinkingTarget()
    • Method Detail

      • getIntent

        public Intent getIntent(Context context,
                                E configuration)
        Method for retrieving a pre-configured Intent to open a distinct view of the SDK.

        Make sure, whenever you call this method, that your ZendeskConfig is initialized. If not this method will return null.
        If you aren't sure, please call #getIntent(android.content.Context, TargetConfiguration, String, String, String)

        Parameters:
        context - An application context
        configuration - A configuration object, that contains all information that will be needed to open the linked activity
        Returns:
        An intent, or null if we are not able to create it
      • getIntent

        public Intent getIntent(Context context,
                                E configuration,
                                java.lang.String zendeskUrl,
                                java.lang.String applicationId,
                                java.lang.String oauthClientId)
        Method for retrieving a pre-configured Intent to open a distinct view of the SDK.

        Call the method if you aren't sure if ZendeskConfig is initialized.

        Parameters:
        context - An application context
        configuration - A configuration object, that contains all information that will be needed to open the linked activity
        zendeskUrl - The full URL of your Zendesk instance, https://{subdomain}.zendesk.com
        applicationId - The application id of your SDK app, as found in the web interface
        oauthClientId - The oauth client id that was supplied when you set up oauth in the web interface
        Returns:
        An intent
      • execute

        public boolean execute(Context context,
                               Intent intent)
        Open a distinct pre-configured distinct view of the SDK.

        Never do something blocking in this method. This method will be run on the main thread and will be killed after 10 seconds.

        Parameters:
        context - An application context
        intent - An intent containing a configuration
        Returns:
        true if the configuration was successfully deserialized and the view opened, false if something went wrong
      • getTaskStackBuilder

        protected static TaskStackBuilder getTaskStackBuilder(Context context,
                                                              java.util.List<Intent> backStackActivities)
        Create and configure a TaskStackBuilder
        Parameters:
        context - An application context
        backStackActivities - A list of Intent, containing information which activities should be added to the backstack.
        Returns:
        A pre-configured TaskStackBuilder
      • getDeepLinkType

        public static DeepLinkType getDeepLinkType(Intent intent)
        Static helper method to determine which DeepLinkType the given intent describes
        Parameters:
        intent - The intent
        Returns:
        The a DeepLinkType or DeepLinkType.Unknown if we can't determine the type