在我的Android应用中,我想使用计费服务。所以这里的代码:
import com.android.vending.billing.IInAppBillingService;
public static final int GOOGLE_API_VERSION = 3;
private IInAppBillingService billingService;
private ServiceConnection serviceConnection = new ServiceConnection() {
@Override
public void onServiceDisconnected(ComponentName name) {
billingService = null;
}
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
billingService = IInAppBillingService.Stub.asInterface(service);
}
};
bundle = billingService.getBuyIntent(Constants.GOOGLE_API_VERSION,
contextPackageName,
productId,
purchaseType,
purchasePayload);
Log.d(LOG_TAG, "purchase: call_getBuyIntent() -> bundle = " + AndroidUtil.bundle2String(bundle));
activity.startIntentSenderForResult(pendingIntent.getIntentSender(),
PURCHASE_FLOW_REQUEST_CODE,
new Intent(), 0, 0, 0);
但是我收到此错误消息:
此处捆绑商品值:
purchase: call_getBuyIntent() -> bundle =
BUNDLE(2):
[RESPONSE_CODE = 0]
[BUY_INTENT = PendingIntent{c4efeca: android.os.BinderProxy@980383b}]