How to directly display the Tickets page for a user's Event or Order.
You may optionally delay the display of tickets for smoother UI transition. The delay is not required. However, displaying the Orders page first can be less confusing for users when navigating back from the Tickets page as the users may be surprised by the sudden appearance of the previously unseen Orders page.
You will need to first add the EventsFragment into the container, and then call the jumpToOrder function.
//Initialize eventsFragment first
val eventsFragment = TicketsSDKSingleton.getEventsFragment(this)
eventsFragment?.let { eventsFragment ->
supportFragmentManager.beginTransaction().replace(layoutId, eventsFragment).commit()
}
// Call that will retrieve the information retrieved for the corresponding id.
// Can be orderId, eventId.
TicketsSDKSingleton.jumpToOrderOrEvent(applicationContext, orderId)
// OR There is also another call which receives the type of id to be used (eventIdType: EventIdType).
TicketsSDKSingleton.jumpToOrderOrEvent(applicationContext, orderId, eventIdType)
let vc = TMTicketsViewController()
present(vc, animated: true)
// optional delay after presenting vc
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
// display tickets for the specified order or event ID
TMTickets.shared.display(orderOrEventId: "12345")
}
Next: Action / Help Button