Android Programming Press on the image to return to the main documentation page.

InAppBilling3

List of types:

BillingManager3
Purchase
SkuDetails

BillingManager3


Permissions:

com.android.vending.BILLING

Events:

BillingSupported (Supported As Boolean, Message As String)
PurchaseCompleted (Success As Boolean, Product As Purchase)
OwnedProducts (Success As Boolean, Purchases As Map)
ProductConsumed (Success As Boolean, Product As Purchase)
InventoryCompleted (Success As Boolean, Products As List)

Members:


  ConsumeProduct (Product As Purchase)

  DebugLogging As Boolean [write only]

  GetInventoryInformation (SKUs As List)

  GetOwnedProducts

  Initialize (EventName As String, PublicKey As String)

  RequestPayment (ProductId As String, ProductType As String, DeveloperPayload As String)

  SubscriptionsSupported As Boolean [read only]

Members description:

ConsumeProduct (Product As Purchase)
Consumes the given Purchase. The ProductConsumed event will be raised.
DebugLogging As Boolean [write only]
Set to true to enable debug logging.
GetInventoryInformation (SKUs As List)
Requests information about the store products. The InventoryCompleted event will be raised in the current module.
SKUs - List or array with the products ids. Each item should be a string.
GetOwnedProducts
Requests the current products purchased by the user.
The OwnedProducts event will be raised with the result.
Initialize (EventName As String, PublicKey As String)
Initializes the object.
EventName - Sets the subs that will handle the events.
PublicKey - Application public key from the developer console.
RequestPayment (ProductId As String, ProductType As String, DeveloperPayload As String)
Makes a payment request.
ProductId - The product id.
ProductType - "inapp" for regular products or "subs" for subscriptions.
DeveloperPayload - A string that will be tied to this purchase.
SubscriptionsSupported As Boolean [read only]
Tests whether subscriptions are supported.

Purchase

Represents an in-app billing purchase.

Events:

None

Members:


  DeveloperPayload As String [read only]

  ItemType As String [read only]

  ProductId As String [read only]

  PurchaseState As Int [read only]

  PurchaseTime As Long [read only]

  STATE_CANCELED As Int

  STATE_PURCHASED As Int

  STATE_REFUNDED As Int

  toString As String

Members description:

DeveloperPayload As String [read only]
ItemType As String [read only]
Returns the item type: inapp or subs (for subscriptions).
ProductId As String [read only]
PurchaseState As Int [read only]
Returns the purchase state (one of the STATE constants).
PurchaseTime As Long [read only]
STATE_CANCELED As Int
STATE_PURCHASED As Int
STATE_REFUNDED As Int
toString As String

SkuDetails

Represents an in-app product's listing details.

Events:

None

Members:


  Description As String [read only]

  ItemType As String [read only]

  Price As String [read only]

  Sku As String [read only]

  Title As String [read only]

  toString As String

  Type As String [read only]

Members description:

Description As String [read only]
ItemType As String [read only]
Price As String [read only]
Sku As String [read only]
Title As String [read only]
toString As String
Type As String [read only]

Top