C# Class Billing.PurchaseDatabase

An example database that records the state of each purchase. You should use an obfuscator before storing any information to persistent storage. The obfuscator should use a key that is specific to the device and/or user. Otherwise an attacker could copy a database full of valid purchases and distribute it to others.
Datei anzeigen Open project: MarkEaton1/Monodroid-InApp-Billing Class Usage Examples

Public Methods

Method Description
Close ( ) : void
PurchaseDatabase ( Android.Content.Context context ) : System.Runtime.CompilerServices
QueryAllPurchasedItems ( ) : ICursor

Returns a cursor that can be used to read all the rows and columns of the "purchased items" table.

Private Methods

Method Description
InsertOrder ( string orderId, string productId, Consts state, long purchaseTime, string developerPayload ) : void

Inserts a purchased product into the database. There may be multiple rows in the table for the same product if it was purchased multiple times or if it was refunded.

UpdatePurchase ( string orderId, string productId, Consts purchaseState, long purchaseTime, string developerPayload ) : int
UpdatePurchasedItem ( string productId, int quantity ) : void

Updates the quantity of the given product to the given value. If the given value is zero, then the product is removed from the table.

Method Details

Close() public method

public Close ( ) : void
return void

PurchaseDatabase() public method

public PurchaseDatabase ( Android.Content.Context context ) : System.Runtime.CompilerServices
context Android.Content.Context
return System.Runtime.CompilerServices

QueryAllPurchasedItems() public method

Returns a cursor that can be used to read all the rows and columns of the "purchased items" table.
public QueryAllPurchasedItems ( ) : ICursor
return ICursor