Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/182.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 应用内计费服务在某些设备上不可用_Android_In App Billing - Fatal编程技术网

Android 应用内计费服务在某些设备上不可用

Android 应用内计费服务在某些设备上不可用,android,in-app-billing,Android,In App Billing,我正在应用程序中使用应用内付费购买。下面是我使用makerequestbundle的代码 protected Bundle makeRequestBundle(String method) { Bundle request = new Bundle(); request.putString(BILLING_REQUEST, method); request.putInt(API_VERSION, 1); request.putString(PACKAGE_NAME, getPackageName

我正在应用程序中使用应用内付费购买。下面是我使用makerequestbundle的代码

protected Bundle makeRequestBundle(String method) {
Bundle request = new Bundle();
request.putString(BILLING_REQUEST, method);
request.putInt(API_VERSION, 1);
request.putString(PACKAGE_NAME, getPackageName());
return request;
}
下面是我用于购买请求的代码

  Bundle response = mService.sendBillingRequest(request);
  Integer responseCodeIndex     = (Integer) response.get("RESPONSE_CODE");
  PendingIntent pendingIntent = (PendingIntent)       
  response.get("PURCHASE_INTENT");
  PendingIntent pendingIntent1 = (PendingIntent) response.get("BUY_INTENT");
  Long requestIndentifier   = (Long) response.get("REQUEST_ID");
  BillingConstants.ResponseCode responseCode =       
  BillingConstants.ResponseCode.valueOf(responseCodeIndex);
  Log.i(TAG, "REQUEST_PURCHASE Sync Response code: "+responseCode.toString());
此代码给出错误,Android 5.0上不提供此服务