Class DeepLinkingTarget<E extends com.zendesk.sdk.deeplinking.targets.TargetConfiguration>
- java.lang.Object
-
- com.zendesk.sdk.deeplinking.targets.DeepLinkingTarget<E>
-
- 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.ObjectThis is the base class of an deep linking target, containing all needed base features.
-
-
Constructor Summary
Constructors Constructor and Description DeepLinkingTarget()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanexecute(Context context, Intent intent)Open a distinct pre-configured distinct view of the SDK.static DeepLinkTypegetDeepLinkType(Intent intent)Static helper method to determine whichDeepLinkTypethe given intent describesIntentgetIntent(Context context, E configuration)Method for retrieving a pre-configuredIntentto open a distinct view of the SDK.IntentgetIntent(Context context, E configuration, java.lang.String zendeskUrl, java.lang.String applicationId, java.lang.String oauthClientId)Method for retrieving a pre-configuredIntentto open a distinct view of the SDK.protected static TaskStackBuildergetTaskStackBuilder(Context context, java.util.List<Intent> backStackActivities)Create and configure aTaskStackBuilder
-
-
-
Method Detail
-
getIntent
public Intent getIntent(Context context, E configuration)Method for retrieving a pre-configuredIntentto open a distinct view of the SDK.Make sure, whenever you call this method, that your
ZendeskConfigis 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 contextconfiguration- 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-configuredIntentto open a distinct view of the SDK.Call the method if you aren't sure if
ZendeskConfigis initialized.- Parameters:
context- An application contextconfiguration- A configuration object, that contains all information that will be needed to open the linked activityzendeskUrl- The full URL of your Zendesk instance, https://{subdomain}.zendesk.comapplicationId- The application id of your SDK app, as found in the web interfaceoauthClientId- 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 contextintent- 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 aTaskStackBuilder- Parameters:
context- An application contextbackStackActivities- A list ofIntent, 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 whichDeepLinkTypethe given intent describes- Parameters:
intent- The intent- Returns:
- The a DeepLinkType or
DeepLinkType.Unknownif we can't determine the type
-
-