Skip to main content

A. Managing Authentication Results

After an item is successfully submitted through the Entrupy Android SDK's capture flow (as handled by the onCaptureCompleteSuccessfully callback), the journey of an authentication is not yet complete. The initial callback provides confirmation of submission and may include an Estimated Time of Arrival (ETA) or a preliminary status. The definitive authentication result (e.g., Authentic, Unidentified) is determined by Entrupy's backend systems.

This guide provides an overview of how to think about these results and introduces concepts that will be further detailed in the SDK Reference, particularly concerning the Detail View.

1. Understanding the Result Lifecycle

  1. Initial Submission Confirmation: The onCaptureCompleteSuccessfully callback method is your first indication that the item's data and images have been received by Entrupy. The result object passed to this method is important. It often contains:

    • A unique Entrupy ID for the transaction.
    • Initial status information, which could be an ETA for the final result (e.g., "Processing, ETA: 10 minutes").
    • Echoed item metadata that you provided.

    You should store the Entrupy ID, associating it with your customer_item_id, to track the authentication status.

  2. Asynchronous Result Delivery: The final authentication result is typically delivered asynchronously.

    • Webhooks (Recommended for Backend): The most robust way to receive final results is by configuring webhooks from the Entrupy API to your backend server. Your backend can then update your system of record and notify your app as needed.
    • API Polling/Refreshing: Making direct requests to the Entrupy API to receive results is also an option if webhooks are not a fit for your deployment.
    • SDK Polling/Refreshing: The SDK provides mechanisms to refresh or fetch the latest status of a submission, often used when displaying a list of authentications or a specific item's detail view.
  3. Interpreting the Final Result: The final result will categorize the item (e.g., Authentic, Unidentified, Not Supported, Invalid). Along with this primary result, you may also receive:

    • Certificate Information: For authentic items, a link to a digital certificate of authenticity.
    • Flags: Information about any issues or flags raised on the item (see Handling Result Flags).
    • Catalog Data: Rich product information, condition details, and potentially market data (see Understanding Catalog Data in SDK).
    • Event Timeline: A history of events related to the authentication.

2. Key Identifiers

When managing results, keep track of these important identifiers:

  • customer_item_id: Your internal unique identifier for the item. This is important for correlating Entrupy's results with your own inventory or records.
  • Entrupy ID: The unique ID generated by Entrupy for each authentication attempt. This is used when querying the API or SDK for updates, viewing an item's certificate or when referencing a specific authentication with Entrupy support.

3. Displaying Results in the SDK

The Entrupy Android SDK often provides UI components to display authentication results, most notably the Detail View.

  • Linking to Detail View: Once you have an Entrupy ID, you can typically use it to launch or present the SDK's Detail View for that specific item. This view is designed to show:
    • The final authentication result.
    • ETAs if the result is still pending.
    • Flags associated with the item.
    • Relevant Catalog Data.
    • Certificate access.
    • Communication/support options for that item.

Full details on how to invoke and use the DetailView will be covered in the SDK Reference section, specifically in sdk-reference/view-model-guides/detail-view-controller.md (to be created).

Example of what you might extract from onCaptureCompleteSuccessfully result object (conceptual):

// In your onCaptureCompleteSuccessfully callback method:
// val submissionID = result.submissionId // Or appropriate property
// val initialStatus = result.statusDisplay // Or appropriate property

// Store submissionID and associate it with item["customer_item_id"]
// Update UI: "Item submitted. Initial status: (initialStatus ?: "Pending")"
// Later, use submissionID to fetch full details or show the Detail View.

4. Next Steps