Display Events and Orders
  • 27 Feb 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Display Events and Orders

  • Dark
    Light

Article summary

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.

Android

You will need to first add the EventsFragment into the container, and then call the jumpToOrder function.

Example Android code:

val eventsFragment = TicketsSDKSingleton.getEventsFragment(this) 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)

// There is also another call which receives the type of id to be used.
fun jumpToOrderOrEvent(context: Context, eventId: String, eventIdType: EventIdType)

iOS

Example Swift Code:

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")
}

Was this article helpful?