How can a Service Provider synchronize the Service Delivery process with its own processes

Let’s say that you need to generate the commands addressed to the card dynamically, based on some contextual information that needs to be coordinated between its server and its mobile app. Our recommendation is to create a shared session between those two components, and then launching the Fidesmo Service Delivery process to the card.
This can be accomplished in many different ways; here below we describe one way of implementing it:

  1. The user interacts with your App, which communicates with your server. During the session, the data to be used in the card commands is retrieved or generated.
    For example, an access control application determines the building, area and beginning and end times to grant access to the cardholder.
  2. Your server communicates to your App the serviceId to be used when requesting Fidesmo to deliver the service to the contactless card.
    Fidesmo puts no constraints on serviceIds, so Service Providers are free to generate them dynamically if needed.
  3. Your App launches the Service Delivery process with the Android Intent specified in this document, sending as parameters your appId and the serviceId received from your server. The Service Delivery process executes normally - your server will recognize the serviceId and send the appropriate card commands.
  4. After completion, Fidesmo App returns the result code to your App, which can continue execution.
  5. Your App can continue interacting with your server, if necessary. Both components are now aware of the successful delivery of the service.

An alternative is to use a URL that will open the Fidesmo App and launch the service delivery process. Such URL must be built according to this syntax:{appId}/services/{serviceId}

where appId and serviceId are the same application and service identifiers as in the Android Intent interface.