Android市場は電話で更新されていません
-
28-10-2019 - |
質問
Androidアプリケーションでアプリ内請求をテストしようとしています。問題は、請求サービスに拘束できないため、私の市場は最新ではないように見えることです(私はからAndroidの例コードを使用しています ここ. 。メッセージを受け取り続けています このアプリは市場に接続できません。市場のバージョンは古くなっている可能性があります。このアプリは引き続き使用できますが、購入できるようになりました。
市場を開き、家にぶつかり、5〜10分間待って、概説したように再試行して市場を更新しようとしました ここ, 、しかし、それは問題を解決しませんでした。私は電話接続のないNexus Oneでテストしています - OS 2.2でWiFiを超えて(これが関連するかどうかはわかりません)。他の誰かがこの問題に遭遇しましたか?
これが私のアクティビティのコードです:
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;
}
解決
たぶん、電話にモバイルデータ接続が必要です。最新情報をインストールしてみてください マーケットアプリ 手動で。
所属していません StackOverflow