Get Discovery Results for Android Native

The getResults method allows you to get Discovery results for a specific asset.

Table 1. getResults
Parameter Description
options Input parameter of type DiscoveryOptions. An instance of DiscoveryOptions encapsulates a Type, a limit long integer of how many Discovery results are desired, and a timeout (in milliseconds) long integer for http connections. The Type is an enum that can be set to either SimilarAssets, Popular, or Momentum. By default, DiscoveryOptions are instantiated with SimilarAssets.
embedCode Input parameter of type String. The embed code for the Discovery Type SimilarAssets. Ignored for other Discovery types.
pcode Input parameter of type String. The pcode.
parameters Input parameter of type Map<String, String>. The parameters as key-value pairs in an associative array, where the keys are strings and the values are strings. For a detailed list and examples of parameters, please refer to the Summary of Ooyala Discovery REST API Requests.
callback Input parameter of type Callback. The Callback interface contains a method which takes output parameters results and error. This callback method handles Discovery results. The callback might not be called on the main thread.

This method is static.

The error parameter taken by callback might be populated with one among various error enum values associated with Discovery. A list of the various values is provided here: Dealing with Android Mobile SDK Errors. They are prefixed with ERROR_DISCOVERY or may be ERROR_UNKNOWN.