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);
}
}