Billing.BillingReceiver.OnReceive C# (CSharp) Метод

OnReceive() публичный Метод

This is the entry point for all asynchronous messages sent from Android Market to the application. This method forwards the messages on to the BillingService, which handles the communication back to Android Market. The BillingService also reports state changes back to the application through the ResponseHandler.
public OnReceive ( Android.Content.Context context, Android.Content.Intent intent ) : void
context Android.Content.Context
intent Android.Content.Intent
Результат void
        public override void OnReceive(Context context, Intent intent)
        {
            string action = intent.Action;
            if (Consts.ACTION_PURCHASE_STATE_CHANGED.Equals(action))
            {
                string signedData = intent.GetStringExtra(Consts.INAPP_SIGNED_DATA);
                string signature = intent.GetStringExtra(Consts.INAPP_SIGNATURE);
                PurchaseStateChanged(context, signedData, signature);
            }
            else if (Consts.ACTION_NOTIFY.Equals(action))
            {
                string notifyId = intent.GetStringExtra(Consts.NOTIFICATION_ID);
                if (Consts.DEBUG)
                {
                    Log.Info(TAG, "notifyId: " + notifyId);
                }
                Notify(context, notifyId);
            }
            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);
                CheckResponseCode(context, requestId, responseCodeIndex);
            }
            else
            {
                Log.Warn(TAG, "unexpected action: " + action);
            }
        }