B4A Library In-App Billing v3 library

Discussion in 'Additional libraries, classes and official updates' started by Erel, Jun 6, 2013.

Thread Status:
Not open for further replies.
  1. Erel

    Erel Administrator Staff Member Licensed User

    Accept payments with Google In-app Billing (v3) service.

    The tutorial is available here: http://www.basic4ppc.com/forum/basi...ls/29997-android-app-billing-v3-tutorial.html

    V1.32 - Fixes a crash that can happen when the device doesn't support in app billing.
    V1.31 - Allows accessing the store inventory information:
    Code:
    manager.GetInventoryInformation(Array(<products ids here>))

    Sub Manager_InventoryCompleted (Success As Boolean, Products As List)
    If Success Then
       
    For Each sk As SkuDetails In Products
        
    Log(sk)
       
    Next
    End If
    End Sub
     

    Attached Files:

    Last edited: Oct 28, 2018
  2. Erel

    Erel Administrator Staff Member Licensed User

    V1.10 - update based on Google recommendation.
     
  3. JOANORSKY

    JOANORSKY Member Licensed User

    Thank you Erel... :)
     
  4. JOANORSKY

    JOANORSKY Member Licensed User

    Hello Erel... after i've made the upgrade i started to have this error.. anything i did wrong?


    upload_2013-10-23_13-57-32.png
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    Fixed (same version).
     
  6. shaxboz

    shaxboz Member Licensed User

    Erel when I use this library I have problem with it.
    "Sub manager_purchasecompleted signature does not match expected signature"
    I checked with real accaunt
    I checked my key
    But nothing changed...
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    How have you declared this sub?
     
  8. shaxboz

    shaxboz Member Licensed User

    Code:
    Sub Manager_PurchaseCompleted()
        reklama=
    True
        ImageView12.Visible=
    False
    End Sub
     
  9. Erel

    Erel Administrator Staff Member Licensed User

  10. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    Using this lib and this type of billing...
    Do I need to use the licence lib? or this is enough to be sure you sell the in-app to only one device?

    Draft apps are not allowed any more.
    Does this lib adds the BILLING permission to the apk?

    Thanks
     
    Last edited: Jul 13, 2015
  11. MarcoRome

    MarcoRome Expert Licensed User

    you do not need to add the lib license, in-app manages all.
    You look also THIS
     
  12. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    Hi, I need my beta testers not to be billed for the add-ins.
    Any way to do it?
    Thanks
     
  13. Erel

    Erel Administrator Staff Member Licensed User

    You can add their accounts as test accounts. You can also cancel their transactions.
     
  14. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    Testing with a Android 2.2 emulator I got this error (see image) in line:

    Code:
    manager.Initialize("manager", key)
     

    Attached Files:

  15. Erel

    Erel Administrator Staff Member Licensed User

    You should test this feature on a real device.
     
  16. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    Ok, any idea of since what version of android does it work?
     
  17. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    and... if I need to test with an emulator, is it enought just to comment this line ?
     
  18. Erel

    Erel Administrator Staff Member Licensed User

    It should be supported on all versions.

    You can catch this error with a Try / Catch block.
     
  19. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    Adding Billing to a new app it cant locate any SKU and I can find why!

    My code is identical to my old app wich works ok, except the key...
    Code:
    Private key As String = "MIIBIjANBgkqhkiG9w0BA......"
        
    Dim Productid1, Productid2 As String
        
    Dim Producttype As String
        
    Dim DeveloperPayload As String
        DeveloperPayload=
    "pac" 
        Producttype=
    "inapp" 
        Productid1 = 
    "profesional"
    And this is what I get when I run it:

    Billing service connected.
    Checking for in-app billing 3 support.
    In-app billing version 3 supported for armi.pac
    Subscriptions AVAILABLE.
    true, Setup successful. (response: 0:OK)
    Info: Subscriptions supported: true
    Starting async operation: refresh inventory
    Querying owned items, item type: inapp
    Package name: armi.pac
    Calling getPurchases with continuation token: null
    Owned items response: 0
    Continuation token: null
    Querying SKU details.
    queryPrices: nothing to do because there are no SKUs.
    Querying owned items, item type: subs
    Package name: armi.pac
    Calling getPurchases with continuation token: null
    Owned items response: 0
    Continuation token: null
    Querying SKU details.
    queryPrices: nothing to do because there are no SKUs.
    Ending async operation: refresh inventory

    But the app does has a SKU as you can see in the image.

    What can be wrong?
    Thanks
     

    Attached Files:

  20. Erel

    Erel Administrator Staff Member Licensed User

    Have you already published the app? In some cases IAP only works after you publish the app. You can temporary publish it and then remove it.
     
Thread Status:
Not open for further replies.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice