public void OnSuccess(global::Java.Lang.Object result)
{
var str = result.JavaCast<Java.Lang.String>().ToString();
// Parse receipts into a list
IList<Receipt> receipts = null;
try
{
receipts = ReceiptsFromResponse(str, _publicKey);
// Cache the receipts to file for later use when the network may not be accessible
ToCache(receipts, _gamerUuid);
}
catch (Exception e)
{
OnFailure(OuyaErrorCodes.ThrowDuringOnSuccess, "Error decrypting receipts: " + e.Message, Bundle.Empty);
}
_tcs.SetResult(receipts);
}