Я пытаюсь проверить биллинг в приложении в моем приложении Android.Проблема в том, что, похоже, мой рынок не обновлен, так как я не могу привязаться к службе выставления счетов (я использую пример кода Android от здесь . Я продолжаю получать сообщение Это приложениеНевозможно подключиться к Market. Ваша версия Market может быть устаревшей. Вы можете продолжать использовать это приложение, но не сможете совершать покупки.
Я пытался обновить рынок, открывэто, ударить по дому, ждать 5-10 минут и пытаться снова, как указано здесь , но это не решило проблему. Я тестирую на Nexus One без телефонного соединения - только через WiFi (не уверен, что это актуально) с ОС 2.2. Кто-нибудь еще сталкивался с этой проблемой?
Вот код из моей деятельности:
if (!mBillingService.checkBillingSupported()) {
showDialog(DIALOG_CANNOT_CONNECT_ID);
}
и это код из моего биллингаслужба, которая показывает биллинг не поддерживается:
public boolean checkBillingSupported() {
return new CheckBillingSupported().runRequest();
}
class CheckBillingSupported extends BillingRequest {
public CheckBillingSupported() {
// This object is never created as a side effect of starting this
// service so we pass -1 as the startId to indicate that we should
// not stop this service after executing this request.
super(-1);
}
@Override
protected long run() throws RemoteException {
Bundle request = makeRequestBundle("CHECK_BILLING_SUPPORTED");
Bundle response = mService.sendBillingRequest(request);
int responseCode = response.getInt(Consts.BILLING_RESPONSE_RESPONSE_CODE);
if (Consts.DEBUG) {
Log.i(TAG, "CheckBillingSupported response code: " +
ResponseCode.valueOf(responseCode));
}
boolean billingSupported = (responseCode == ResponseCode.RESULT_OK.ordinal());
ResponseHandler.checkBillingSupportedResponse(billingSupported);
return Consts.BILLING_RESPONSE_INVALID_REQUEST_ID;
}
}
private boolean bindToMarketBillingService() {
try {
if (Consts.DEBUG) {
Log.i(TAG, "binding to Market billing service");
}
boolean bindResult = bindService(
new Intent(Consts.MARKET_BILLING_SERVICE_ACTION),
this, // ServiceConnection.
Context.BIND_AUTO_CREATE);
if (bindResult) {
return true;
} else {
Log.e(TAG, "Could not bind to service.");
}
} catch (SecurityException e) {
Log.e(TAG, "Security exception: " + e);
}
return false;
}