2013-06-26 33 views
6

我已在檢查Internet連接,並且Google Play市場已安裝最新的軟件包版本。getBuyIntent返回null API版本3應用內結算

基本上,該寓言失敗了,因爲應用內購買的buyIntent在首次使用後返回null。

下面是代碼,我懷疑的錯誤是在該塊(沒有別的地方)

我也越來越從catch塊這個返回,但我不知道這意味着什麼,包名稱已更改,因爲我不希望顯示我的應用程序。

錯誤:(而不是從我的包,但系統級)

[79] InAppBillingUtils.getPreferredAccount: com.mypackage.appname: Account from first account - [jbC6uT04zd8tXCrK] 

代碼:

Bundle buyIntentBundle = null; 
     try 
     { 
      buyIntentBundle = 
        mServiceConnection.mBillingService.getBuyIntent(
        3, 
        mContext.getPackageName(), 
        mPurchaseCodesAsStrings[PurchaseType], 
        "inapp", 
        mDeveloperPayload 
       ); 
     } 
     catch (RemoteException e) 
     { 
      e.printStackTrace(); 
     } 

     PendingIntent pendingIntent = buyIntentBundle.getParcelable("BUY_INTENT"); 

回答

10

你,如果你使用的API版本3得到這個錯誤和你想重新購買一個託管應用內產品。所有產品都受版本3的管理。

在試圖再購買之前,您必須基本上使用已經存在的MANAGED產品。