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.Object
This 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 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 whichDeepLinkType
the given intent describesIntent
getIntent(Context context, E configuration)
Method for retrieving a pre-configuredIntent
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-configuredIntent
to open a distinct view of the SDK.protected static TaskStackBuilder
getTaskStackBuilder(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-configuredIntent
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 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-configuredIntent
to open a distinct view of the SDK.Call the method if you aren't sure if
ZendeskConfig
is 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 whichDeepLinkType
the given intent describes- Parameters:
intent
- The intent- Returns:
- The a DeepLinkType or
DeepLinkType.Unknown
if we can't determine the type
-
-