私は、Android in app purchase の手順をほとんど t まで実行しました。
署名済みアプリをエクスポートしました。
ITEM_ID - 「剣」のバンドルをリクエストします
APK をアップロードし、アイテム ID「sword」でアプリ内購入エントリを作成します。次に、署名済みの APK を 2 番目の電話 (Google テスト アカウントに割り当てられています) にインストールします。
私が得るのはRESULT_DEVELOPER_ERRORだけです:
http://developer.android.com/guide/google/play/billing/billing_reference.html
次の間違いのいずれかを犯したと言います。
1/マニフェストが間違っている - 私のマニフェストは間違いなく課金を要求しました 2/アプリケーションが適切に署名されていません - Android 開発者コンソールにアップロードした署名済みの apk をインストールしています 3/バンドル キーが見つからないか、リクエスト タイプが認識されません - 私のバンドルは次のようになります:
request.putString("BILLING_REQUEST", method);
request.putInt("API_VERSION", 1);
Log.e("sc2","package name is :"+mContext.getPackageName());
request.putString("PACKAGE_NAME", mContext.getPackageName());
に続く :
request.putString("ITEM_ID", itemId);
try {
Bundle response = mService.sendBillingRequest(request);
//The RESPONSE_CODE key provides you with the status of the request
Integer responseCodeIndex = (Integer) response.get("RESPONSE_CODE");
//The PURCHASE_INTENT key provides you with a PendingIntent, which you can use to launch the checkout UI
PendingIntent pendingIntent = (PendingIntent) response.get("PURCHASE_INTENT");
//The REQUEST_ID key provides you with a unique request identifier for the request
Long requestIndentifier = (Long) response.get("REQUEST_ID");
Log.i(TAG, "current request is:" + requestIndentifier);
C.ResponseCode responseCode = C.ResponseCode.valueOf(responseCodeIndex);
Log.i(TAG, "REQUEST_PURCHASE Sync Response code: "+responseCode.toString());
startBuyPageActivity(pendingIntent, new Intent(), activityContext);
itemId = "剣"
....私はこの問題についてあらゆる努力を尽くしてきました - そして、一部のヒーローがおそらくここで何がうまくいかないのかを把握できない限り、アプリの課金でアンドロイドを完全に捨てる誘惑に駆られています.
android.test.purchase などのテスト用のすべての標準製品 ID は完全に機能します。