Migrating from 2.x to 3.0.0
Version 3.0.0 of the Support SDK has a single breaking API change as
has been moved/renamed to
zendesk.core.ZendeskLocaleConvertor. If you are using this class you will
need to update your usage to use the new class.
Migrating from 2.2.1 to 2.3.0
In 2.3.0 we updated to use
Theme.MaterialComponents instead of
Theme.AppCompat. If you're
applying your own theme to our SDK activities, you may need to update these themes to use
Theme.MaterialComponents too. See Customizing the look for more details on
Migrating from 1.x to 2.x
This page covers the key changes you'll need to make to your app to upgrade from a 1.x version of the Support SDK to 2.x.
Update the artifact name
With 2.x, the artifact name has changed from
support. The correct dependency Gradle
snippet now looks like this:
implementation group: 'com.zendesk', name: 'support', version: '2.3.0'
If you're using the API providers artifact, the name has changed from
implementation group: 'com.zendesk', name: 'support-providers', version: '2.3.0'
Update the initialization call
Previously, you initialized the SDK using the
ZendeskConfig singleton. In 2.x, we have
split out the responsibilities of the SDK into two separate enum singletons that must both be
initialized separately. Initialize the
Zendesk enum singleton with your account details first, and then
Support enum singleton as follows:
import zendesk.core.Zendesk; import zendesk.support.Support; Zendesk.INSTANCE.init(context, zendeskUrl, applicationId, oauthClientId); Support.INSTANCE.init(Zendesk.INSTANCE);
For more information, see Initializing the Support SDK.
Update the identity
The mechanism for setting an identity is unchanged in 2.x, but the identity classes have moved, and
setIdentity method is on
Zendesk rather than the old
Setting an anonymous identity:
import zendesk.core.Zendesk; import zendesk.core.AnonymousIdentity; Identity identity = new AnonymousIdentity(); Zendesk.INSTANCE.setIdentity(identity)
Setting a JWT identity:
import zendesk.core.Zendesk; import zendesk.core.JwtIdentity; JwtIdentity identity = new JwtIdentity(myJwtTokenString); Zendesk.INSTANCE.setIdentity(identity);
For more information, see Setting an identity.
Update the Activity names
All the Activity classes have been renamed, moved, or completely rewritten. Update your references using the table below.
|1.x Activity name||2.x Activity name||Feature|
|com.zendesk.sdk.support.SupportActivity||zendesk.support.guide.HelpCenterActivity||Browse and search Help Center content|
|com.zendesk.sdk.support.ViewArticleActivity||zendesk.support.guide.ViewArticleActivity||View an individual Help Center article|
|com.zendesk.sdk.feedback.ui.ContactZendeskActivity||zendesk.support.request.RequestActivity||Create a new ticket in Support|
|com.zendesk.sdk.requests.ViewRequestActivity||zendesk.support.request.RequestActivity||View and update a ticket in Support|
|com.zendesk.sdk.requests.RequestActivity||zendesk.support.requestlist.RequestListActivity||View a list of the user's tickets|
Update the way you start SDK activities
We implemented a builder-based pattern for starting and configuring all our SDK activities in 2.x. All previous methods for starting our activities should be replaced with the builders, as detailed in Configuring the SDK activities.
Update the provider references
All our provider classes have moved. Some are now accessed through the
import zendesk.support.Support; import zendesk.support.HelpCenterProvider; import zendesk.support.RequestProvider; import zendesk.support.UploadProvider; HelpCenterProvider helpCenterProvider = Support.INSTANCE.provider().helpCenterProvider(); RequestProvider requestProvider = Support.INSTANCE.provider().requestProvider(); UploadProvider uploadProvider = Support.INSTANCE.provider().uploadProvider();
Some are now accessed through the
import zendesk.core.Zendesk; import zendesk.core.UserProvider; import zendesk.core.PushRegistrationProvider; UserProvider userProvider = Zendesk.INSTANCE.provider().userProvider(); PushRegistrationProvider pushRegistrationProvider = Zendesk.INSTANCE.provider().pushRegistrationProvider();
Update push notification handling and deep-linking
If you previously used the
ZendeskDeepLinking.INSTANCE.refreshRequest method, replace it with
If you previously used
ZendeskDeepLinking to obtain a deep-link
Intent, replace it with the
new RequestUiConfig.Builder() .withRequestId(requestId) .deepLinkIntent(getApplicationContext());
In 2.0.0 we began shipping the Support SDK with
consumer-proguard.pro files, which are
automatically applied to your app when Proguard is run. These should remove the need for custom
Proguard rules for the Support SDK. See Use Proguard for more details.
Where to next?
Now that you've completed these steps, your app should be building and running with version 2.x of the Support SDK. To take advantage of the latest features, try out our new configuration options.