1. Download our Official Android App: Forums for Android!

Apps Google Billing getSkuDetails returns BILLING_RESPONSE_RESULT_ERROR

Discussion in 'Android Development' started by niceneasy, Apr 8, 2016.

  1. niceneasy

    niceneasy Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Apr 8, 2016

    Apr 8, 2016
    1
    0
    5
    Male
    Hi,

    My app uses the Google Billing API and Google Analytics. I'm sending error reports to Analytics whenever there is an error while setting up Billing.
    For about 2000 daily users I get over 700 reports that getSkuDetails returns 6 in response which according to the online reference is BILLING_RESPONSE_RESULT_ERROR. I tried contacting Google, tried the official Google Groups and many other resources and didn't find any solid info about this error.
    The app also uses Tapjoy which also sends error reports and the amount is similar to those of Billing. Tapjoy unfortunatelly doesn't provide any information about the error.
    Does anyone have solid info about the BILLING_RESPONSE_RESULT_ERROR? What does it mean, and when does it occur?

    Here is a sample of the billing code:
    Code (Java):
    1. private static String requestAvailableItems(String[] productIds)
    2. {
    3.     ArrayList<String> temp = new ArrayList<String>();
    4.    
    5.     for(int i = 0; i < productIds.length; i++)
    6.     {
    7.         temp.add(productIds[i]);
    8.     }
    9.    
    10.     Bundle skus = new Bundle();
    11.     skus.putStringArrayList("ITEM_ID_LIST", temp);
    12.    
    13.     Bundle availableItems = _billingService.getSkuDetails(3, UglyInApp.packageName, "inapp", skus);
    14.     int response = availableItems.getInt("RESPONSE_CODE");
    15.    
    16.     if(response == 0)
    17.     {
    18.         ArrayList<String> responseList = availableItems.getStringArrayList("DETAILS_LIST");
    19.        
    20.         for (String thisResponse : responseList)
    21.         {
    22.             JSONObject object = new JSONObject(thisResponse);
    23.            
    24.             _availableItems.put(object.getString("productId"), object);
    25.         }
    26.        
    27.         return "0";
    28.     }
    29.     else
    30.     {
    31.         return Integer.toString(response);
    32.     }
    33. }
     

    Advertisement

Share This Page

Loading...