Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2014

    In-App-Payments - Error 6

    I am migrating the In-App-Payments in one of the apps from Google Play Services to Nokia (following the instructions from http://developer.nokia.com/resources...ing-guide.html) and using test product IDs. However, when I run the application in the emulator, the first call to "getPurchases" function always works fine, but all the subsequent calls to "getPurchases" fail with Error 6. The same happens with "getProductDetails" method.

    Is that a known problem?


  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Tampere, Finland

    Re: In-App-Payments - Error 6


    I made test application that calls getPurchases two times by giving test id as queryItem. Both calls was returning without error. My code below. Were you using this queryBundle or were you using setProductMappings? Note: If you use product mappings, you should not give queryBundle at all.

    ArrayList<String> productList = new ArrayList<String>();
    Bundle queryProducts = new Bundle();
    queryProducts.putStringArrayList("ITEM_ID_LIST", productList);
    String continuationToken = null;
    Bundle ownedItems = mNokiaService.getPurchases(3, getPackageName(), "inapp" , queryProducts, continuationToken);	
    int response = ownedItems.getInt("RESPONSE_CODE");
    if (response == 0) {
        ArrayList<String> ownedProducts = ownedItems.getStringArrayList("INAPP_PURCHASE_ITEM_LIST");
        ArrayList<String> purchaseDataList = ownedItems.getStringArrayList("INAPP_PURCHASE_DATA_LIST");
        for (int i = 0; i < purchaseDataList.size(); ++i) {
            String purchaseData = purchaseDataList.get(i);
            String product = ownedProducts.get(i);
            // do something with this purchase information
            // e.g. display the updated list of products owned by user
    return ownedItems;
    Janne Koskinen
    Last edited by jtjk; 2014-03-20 at 08:27.

  3. #3
    Registered User
    Join Date
    Mar 2014

    Re: In-App-Payments - Error 6

    Hi Janne Koskinen,

    You are correct. I found out it was my mistake. Everything works fine. I was running the second commands in the UI Thread, which is not OK. Everything works fine now (I have fixed my problematic code and moved it into AsyncTask).

    Thank you for your help.


Similar Threads

  1. External In App Payments
    By akinorta in forum Publishing to Nokia Store
    Replies: 3
    Last Post: 2013-08-14, 12:00
  2. Anybody else not seeing payments from US?
    By postmfm in forum [Closed] Publishing to Nokia Store
    Replies: 1
    Last Post: 2011-03-04, 10:28
  3. In Game Payments
    By rdewan in forum General Development Questions
    Replies: 1
    Last Post: 2010-11-19, 12:30
  4. Question about payments from OVI
    By vereal in forum [Closed] Publishing to Nokia Store
    Replies: 3
    Last Post: 2010-10-15, 00:43
  5. Payments
    By Koinup in forum [Closed] Publishing to Nokia Store
    Replies: 1
    Last Post: 2010-06-07, 21:04

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts