Billing.BillingService.HandleCommand C# (CSharp) Method

HandleCommand() public method

The BillingReceiver sends messages to this service using intents. Each intent has an action and some extra arguments specific to that action.
public HandleCommand ( Android.Content.Intent intent, int startId ) : void
intent Android.Content.Intent the intent containing one of the supported actions
startId int an identifier for the invocation instance of this service
return void
        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);
            }
        }