public virtual void HandleCommand(Intent intent, int startId)
{
string action = intent.Action;
if (Consts.DEBUG)
{
Log.Info(TAG, "handleCommand() action: " + action);
}
if (Consts.ACTION_CONFIRM_NOTIFICATION.Equals(action))
{
string[] notifyIds = intent.GetStringArrayExtra(Consts.NOTIFICATION_ID);
ConfirmNotificationsMethod(startId, notifyIds);
}
else if (Consts.ACTION_GET_PURCHASE_INFORMATION.Equals(action))
{
string notifyId = intent.GetStringExtra(Consts.NOTIFICATION_ID);
GetPurchaseInformationMethod(startId, new string[] { notifyId });
}
else if (Consts.ACTION_PURCHASE_STATE_CHANGED.Equals(action))
{
string signedData = intent.GetStringExtra(Consts.INAPP_SIGNED_DATA);
string signature = intent.GetStringExtra(Consts.INAPP_SIGNATURE);
PurchaseStateChanged(startId, signedData, signature);
}
else if (Consts.ACTION_RESPONSE_CODE.Equals(action))
{
long requestId = intent.GetLongExtra(Consts.INAPP_REQUEST_ID, -1);
int responseCodeIndex = intent.GetIntExtra(Consts.INAPP_RESPONSE_CODE, (int)Consts.ResponseCode.RESULT_ERROR);
Consts.ResponseCode responseCode = (Consts.ResponseCode)responseCodeIndex;
CheckResponseCode(requestId, responseCode);
}
}