Wish it was simpler to just replace the code with what you need, but apparently google describes an alternative option. You'd have to implement the MarketBillingService interface. So it's just a little tweak in design. Fortunately, they show you how to accomplish this.
http://developer.android.com/guide/google/play/billing/billing_integrate.html
Go down to the topic where it says "Creating a Local Service". The subcategories are:
- Binding to the MarketBillingService
- Sending billing requests to the MarketBillingService
- Verifying that in-app billing is supported (CHECK_BILLING_SUPPPORTED)
- Making a purchase request (REQUEST_PURCHASE)
To paraphrase what was written, I'll just describe it here:
In the category: "Verifying that in-app billing is supported (CHECK_BILLING_SUPPPORTED)"
They request that you use the sendBillingRequest(). This allows you to send five different types of billing requests:
- CHECK_BILLING_SUPPORTED—verifies that the Google Play application supports in-app billing and the version of the In-app Billing API available.
- REQUEST_PURCHASE—sends a purchase request for an in-app item.
- GET_PURCHASE_INFORMATION—retrieves transaction information for a purchase or refund.
- CONFIRM_NOTIFICATIONS—acknowledges that you received the transaction information for a purchase or refund.
- RESTORE_TRANSACTIONS—retrieves a user's transaction history for managed purchases.
Says you have to create a bundle before you perform the request.
Here is an example of how to perform an acknowledgement:
Bundle request = makeRequestBundle("CONFIRM_NOTIFICATIONS");
request.putStringArray(NOTIFY_IDS, mNotifyIds);
Bundle response = mService.sendBillingRequest(request);
Once you retrieve the response, check the contents within the Bundle, there will be three key items: RESPONSE_CODE, PURCHASE_INTENT, and REQUEST_ID. The RESPONSE_CODE key provides you with the status of the request and the REQUEST_ID key provides you with a unique request identifier for the request. The PURCHASE_INTENT key provides you with a PendingIntent, which you can use to launch the checkout UI.