Interface IGooglePlayStoreExtensions
Access GooglePlay store specific functionality.
Namespace: UnityEngine.Purchasing
Syntax
public interface IGooglePlayStoreExtensions : IStoreExtension
Methods
ConfirmSubscriptionPriceChange(String, Action<Boolean>)
Initiate a flow to confirm the change of price for an item subscribed by the user.
Declaration
void ConfirmSubscriptionPriceChange(string productId, Action<bool> callback)
Parameters
Type | Name | Description |
---|---|---|
String | productId | Product id |
Action<Boolean> | callback | Price changed event finished successfully |
FinishAdditionalTransaction(String, String)
Executes the same code as GooglePlayStore.FinishTransaction
.
Declaration
[Obsolete("FinishAdditionalTransaction is deprecated, please use GooglePlayStore.FinishTransaction instead. Will be removed soon...")]
void FinishAdditionalTransaction(string productId, string transactionId)
Parameters
Type | Name | Description |
---|---|---|
String | productId | Products id / sku |
String | transactionId | Products transaction id |
GetProductJSONDictionary()
GetProductJSONDictionary is deprecated, nothing will be returns and no code will be executed. Will be removed soon. Use the GoogleProductMetadata
of product.metadata.GetGoogleProductMetadata()
from IStoreController.products
Declaration
[Obsolete("GetProductJSONDictionary is deprecated, nothing will be returns and no code will be executed. Will be removed soon. Use the `GoogleProductMetadata` of `product.metadata.GetGoogleProductMetadata()` from `IStoreController.products`")]
Dictionary<string, string> GetProductJSONDictionary()
Returns
Type | Description |
---|---|
Dictionary<String, String> | null |
IsOwned(Product)
IsOwned is deprecated, false will be returned by default and no code will be executed. Will be removed soon.
Declaration
[Obsolete("IsOwned is deprecated, false will be returned by default and no code will be executed. Will be removed soon.")]
bool IsOwned(Product p)
Parameters
Type | Name | Description |
---|---|---|
Product | p | deprecated |
Returns
Type | Description |
---|---|
Boolean | false |
RestoreTransactions(Action<Boolean>)
Async call to the google store to queryPurchases
using all the different support sku types.
Declaration
void RestoreTransactions(Action<bool> callback)
Parameters
Type | Name | Description |
---|---|---|
Action<Boolean> | callback | Will be called as often as many purchases the queryPurchases finds. (the IStoreCallback will be called as well) |
SetDeferredPurchaseListener(Action<Product>)
Set listener for deferred purchasing events. Deferred purchasing is enabled by default and cannot be changed.
Declaration
void SetDeferredPurchaseListener(Action<Product> action)
Parameters
Type | Name | Description |
---|---|---|
Action<Product> | action | Deferred purchasing successful events. Do not grant the item here. Instead, record the purchase and remind the user to complete the transaction in the Play Store. |
SetLogLevel(Int32)
SetLogLevel is deprecated, no code will be executed. Will be removed soon.
Declaration
[Obsolete("SetLogLevel is deprecated, no code will be executed. Will be removed soon.")]
void SetLogLevel(int level)
Parameters
Type | Name | Description |
---|---|---|
Int32 | level | deprecated |
SetObfuscatedAccountId(String)
Optional obfuscation string to detect irregular activities when making a purchase. For more information please visit https://developer.android.com/google/play/billing/security
Declaration
void SetObfuscatedAccountId(string accountId)
Parameters
Type | Name | Description |
---|---|---|
String | accountId | The obfuscated account id |
SetObfuscatedProfileId(String)
Optional obfuscation string to detect irregular activities when making a purchase For more information please visit https://developer.android.com/google/play/billing/security
Declaration
void SetObfuscatedProfileId(string profileId)
Parameters
Type | Name | Description |
---|---|---|
String | profileId | The obfuscated profile id |
UpgradeDowngradeSubscription(String, String)
Upgrade or downgrade subscriptions, with proration mode IMMEDIATE_WITHOUT_PRORATION
by default
See more
Declaration
void UpgradeDowngradeSubscription(string oldSku, string newSku)
Parameters
Type | Name | Description |
---|---|---|
String | oldSku | current subscription |
String | newSku | new subscription to subscribe |
UpgradeDowngradeSubscription(String, String, Int32)
Upgrade or downgrade subscriptions
Declaration
void UpgradeDowngradeSubscription(string oldSku, string newSku, int desiredProrationMode)
Parameters
Type | Name | Description |
---|---|---|
String | oldSku | current subscription |
String | newSku | new subscription to subscribe |
Int32 | desiredProrationMode | Specifies the mode of proration. See more |