- Print
- DarkLight
Presence SDK Migration, Android
Summary
The old Ticketmaster Presence SDK framework has been replaced by two new frameworks:
- Tickets: Post-Purchase functionality such as viewing purchased Events, Tickets, and Barcodes
- Authentication: Authentication functionality such as Login, Logout, Refresh Tokens, and Member Info
Below is a list of class and method name mapping between the old Presence 1.X or 2.X and the new Authentication 1.X and Tickets 3.X.
Properties
| Presence SDK | Tickets SDK |
|---|---|
| PresenceSDK | TicketsSDKClient |
| TicketsSDKSingleton | |
| PresenceSDK.SDKEnvironment | TicketsSDKSingleton.SDKEnvironment |
| PresenceSDK.HostEnvironment | TicketsSDKSingleton.HostEnvironment |
| PresenceSDK.ActionType | TicketsSDKSingleton.ActionType |
| PresenceSDK.EventIdType | TicketsSDKSingleton.EventIdType |
| PresenceSDK.MemberInfoCompletionCallback | Not needed anymore, to retrieve the member info see fetchUserDetails() in TMAuthentication |
| PresenceSDK.setCanShowHelp()/getCanShowHelp() | TicketsSDKSingleton.canShowHelp |
| PresenceSDK.getPresenceModuleDelegate() | TicketsSDKSingleton.moduleDelegate |
| PresenceSDK.getPresenceOrderDelegate() | TicketsSDKSingleton.orderDelegate |
Configuration
For a source code example, see Example Tasks: Configuration
| Presence SDK | Tickets SDK |
|---|---|
| PresenceSDK.start(...) | TicketsSDKClient.Builder().start(context:Context) Creates a new instance of TicketsSDKClient. Then its needed to be added in TicketsSDKSingleton |
| TicketsSDKSingleton.setTicketsSdkClient(client: TicketsSDKClient) set the TicketsSDKClient instance for the singleton | |
| PresenceSDK.getPresenceSDK | TicketsSDKSingleton Singleton object that saves the current TicketsSDKClient |
| PresenceSDK.setConfig(...) | See Builder in TMAuthentication |
| PresenceSDK.setEnvironment() | TicketsSDKClient.setEnvironment() |
| PresenceSDK.registerContextMenuListener() | TicketsSDKSingleton.registerContextMenuListener() |
| PresenceSDK.unregisterContextMenuListener() | TicketsSDKSingleton.unregisterContextMenuListener() |
| PresenceSDK.isExperienceEnabled() | not needed anymore |
| PresenceSDK.needInvalidateCache() | TicketsSDKSingleton.needInvalidateCache() |
| PresenceSDK.stop() | not needed anymore as ConfigListener is no longer needed. |
| PresenceSDK.clearCache() | not needed anymore |
| PresenceSDK.displayOrder() | not needed anymore |
| PresenceSDK.getMemberInfo() | See fetchUserDetails() in TMAuthentication |
| PresenceSDK.getVersionNumber() | TicketsSDKSingleton.getVersionNumber() |
| PresenceSDK.getSdkState() | not needed anymore |
| PresenceSDK.registerConfigListener() | not needed anymore as the configuration now is retrieved when calling the build() function in TMAuthentication |
| PresenceSDK.unregisterConfigListener() | not needed anymore as the configuration now is retrieved when calling the build() function in TMAuthentication |
| PresenceSDK.canGoBack() | not needed anymore |
| PresenceSDK.presentOrderUpgrade() | TicketsSDKSingleton.presentOrderUpgrade() |
Authentication
Note that all Authentication related methods have been moved to TMAuthentication
For a source code example, see Example Tasks: Authentication
| Presence SDK | TMAuthentication SDK |
|---|---|
| PresenceSDK | TMAuthentication |
| PresenceSDK.SDKEnvironment | TMXDeploymentEnvironment |
| PresenceSDK.HostEnvironment | TMXDeploymentRegion |
| PresenceSDK.setEnvironment() | TMAuthentication.environment Part of TMAuthentication.Builder, define the enviroment that TMAuthentication will be working |
| PresenceSDK.setConfig(HostEnviroment, ...) | TMAuthentication.region Part of TMAuthentication.Builder, define the region that the TMAuthentication will be working. |
| PresenceSDK.setConfig( modernAccountsQuickLogin:boolean, ... ) | TMAuthentication.modernAccountsQuickLogin Part of TMAuthentication.Builder, set the boolean for modern accounts quick login. |
| PresenceSDK.setConfig( moderAccountsAutoQuickLogin:boolean,... ) | TMAuthentication.modernAccountsAutoQuickLogin Part of TMAuthentication.Builder, set the boolean for modern accounts quick auto login. |
| PresenceSDK.setHostLoginQueryParams(...) | TMAuthentication.hostMALoginParameters Part of TMAuthentication.Builder set login parameters for host. |
| PresenceSDK.setArchticsLoginQueryParams(...) | TMAuthentication.archticsMALoginParameters Part of TMAuthentication.Builder set login parameters for archtics. |
| PresenceSDK.registerConfigListener() | TMAuthentication.configuration Configuration of the consumer apikey. It is generated when build() method is called. |
| PresenceSDK.setLoginAccountOptionButton() | Not needed anymore |
| PresenceSDK.logIn() | Removed method, and moved all logic to Authentication |
| PresenceSDK.startLoginFlow(...) | TicketsSDKSingleton.getLoginIntent(activity:FragmentActivity) Generates new intent that will launch Login from Authentication. If the resultCode it's Activity.RESULT_CANCELED it means the login wasn't successful. |
| PresenceSDK.startMfaValidation(...) | TMAuthentication.getMFAIntent() Generates new intent that will launch MFA validation. If the resultCode it's Activity.RESULT_CANCELED it means the validation wasn't successful. |
| TMAuthentication.getDeviceVerificationToken() Returns a Device Verification token previously obtained through the Multifactor Authentication process (MFA) | |
| PresenceSDK.hasUserSignedIn() | TMAuthentication.getToken(AuthSource) Return a valid token for the signed in account. Null if no account tried to log in. |
| PresenceSDK.getMemberInfo() | TMAuthentication.fetchUserDetails() Fetch user details for the current session |
| PresenceSDK.logOut() | TicketsSDKSingleton.logout() and TMAuthentication.logout() |
| PresenceSDK.logOutHost() | Part now of TMAuthentication.logout() |
| PresenceSDK.logOutTeam() | Part now of TMAuthentication.logout() |
| PresenceSDK.getAccessToken() | TMAuthentication.getToken(AuthSource) Retrieve the access token if available, if not, token returns empty. Compare if not empty is logged in. |
| PresenceSDK.isLoggedIntoHost() | See getToken(AuthSource.Host). Retrieve the access token if available, if not, token returns empty. Compare if not empty is logged in. |
| PresenceSDK.isLoggedIntoTeam() | See getToken(AuthSource.Archtics) in TMAuthentication. Retrieve the access token if available, if not, token returns empty. Compare if not empty is logged in. |
| PresenceSDK.isLoggedIn() | Validate if one of the functions isLoggedIntoHost or isLoggedIntoTeam returns true. |
| PresenceSDK.hasUserSignedIn() | See getToken(AuthSource) in TMAuthentication |
| PresenceSDK.hasUserSignedIntoHost() | See getToken(AuthSource) |
| PresenceSDK.hasUserSignedIntoTeam() | See getToken(AuthSource) |
| PresenceSDK.resetPasswordForHost() | not needed anymore |
| PresenceSDK.validateAccessToken() | See getToken(AuthSource) |
Operations
| Presence SDK | Tickets SDK |
|---|---|
| PresenceSDK.jumpToOrderOrEvent() | TicketsSDKSingleton.jumpToOrderOrEvent() |
Branding
Tickets and Authentication define its colors on their corresponding Builder classes.
The other methods are optional, unless you need to customize Tickets branding beyond the basic branding.
| Presence SDK | Authentication SDK / Tickets SDK |
|---|---|
| PresenceSdkBrandingColor | TicketsColors |
| PresenceSDK.setBrandingColor(...) | TicketsSDKClient.Builder().colors(colors: TicketsColors) |
| PresenceSDK.setBrandingColor(...) | TMAuthentication.Builder().colors(colors: ColorTheme) |
| PresenceSDK.setTheme(...) | TMTicketsThemeUtil.setTheme(...) |
| PresenceSDK.setLogoResourceId(...) | BrandLogoHelper.setBrandLogoResourceId(...) |
| PresenceSDK.enableTMBrandingColorOverride(...) | not needed anymore |
Order Delegate
All User-behavior analytics have been moved to UserAnalyticsDelegate.
The remaining methods in TMTicketsOrderDelegate represent either:
- non-analytics: actions that require your application to do something.
- analytics that are not based on User-behavior: such as didUpdateEvents
| PresenceOrderDelegate | TicketsOrderDelegate |
|---|---|
| PresenceOrderDelegate.PresenceEventOrders | TicketsOrderDelegate.EventOrders |
| PresenceOrderDelegate.PresenceEvent | TicketsOrderDelegate.Event |
| PresenceOrderDelegate.didUpdateEvents(...) | TicketsOrderDelegate.didUpdateEvents(eventOrdersArray:List) |
| PresenceOrderDelegate.didUpdateTickets(...) | TicketsOrderDelegate.didUpdateTickets(eventOrders:EventOrders) |
Module
| PresenceModuleDelegate | TicketsModuleDelegate |
|---|---|
| PresenceModuleDelegate.PresenceOrder | TicketsModuleDelegate.Order |
| PresenceModuleDelegate.OrderInfo | TicketsModuleDelegate.OrderInfo |
| PresenceModuleDelegate.PresenceTicket | TicketsModuleDelegate.Ticket |
| PresenceModuleDelegate.PresenceTicketFee | TicketsModuleDelegate.TicketFee |
| PresenceModuleDelegate.PresenceDelivery | TicketsModuleDelegate.Delivery |
| PresenceModuleDelegate.DeliverySource | TicketsModuleDelegate.DeliverySource |
| PresenceModuleDelegate.LatLng | TicketsModuleDelegate.LatLng |
Analytics
Old notification-based PresenceEventAnalytics have been replaced with a simplier UserAnalyticsDelegate.
| PresenceEventAnalytics | UserAnalyticsDelegate |
|---|---|
| sendAnalyticEvent(...) | sendAnalyticsEvent(AnalyticsData) |
| getLiveData() Exposes the LiveData value to be observe receiving any changes in real time |
