Interface IStoreService
A service responsible for connecting to a store and its extensions.
Namespace: UnityEngine .Purchasing
Assembly: Unity.Purchasing.dll
Syntax
public interface IStoreService
Properties
Amazon
Amazon Specific Store Extensions
Declaration
IAmazonAppsStoreExtendedService? Amazon { get; }
Property Value
Type | Description |
---|---|
IAmazon |
Apple
Apple Specific Store Extensions
Declaration
IAppleStoreExtendedService? Apple { get; }
Property Value
Type | Description |
---|---|
IApple |
Google Specific Store Extensions
Declaration
IGooglePlayStoreExtendedService? Google { get; }
Property Value
Type | Description |
---|---|
IGoogle |
Methods
AddOnStoreDisconnectedAction(Action<StoreConnectionFailureDescription>)
Add an action to be called when connection is lost to the current store.
Declaration
void AddOnStoreDisconnectedAction(Action<StoreConnectionFailureDescription> onStoreDisconnected)
Parameters
Type | Name | Description |
---|---|---|
Action<Store |
onStoreDisconnected | The action to be added to the list of callbacks. |
ConnectAsync()
Initiates a connection to the store.
Declaration
Task ConnectAsync()
Returns
Type | Description |
---|---|
Task | Return a handle to the initialization operation. |
Exceptions
Type | Condition |
---|---|
Store |
Throws an exception if the connection fails. |
RemoveOnStoreDisconnectedAction(Action<StoreConnectionFailureDescription>)
Remove an action to be called when connection is lost to the current store.
Declaration
void RemoveOnStoreDisconnectedAction(Action<StoreConnectionFailureDescription> onStoreDisconnected)
Parameters
Type | Name | Description |
---|---|---|
Action<Store |
onStoreDisconnected | The action to be removed from the list of callbacks. |
SetStoreReconnectionRetryPolicyOnDisconnection(IRetryPolicy?)
Set a custom reconnection policy when the store disconnects.
Declaration
void SetStoreReconnectionRetryPolicyOnDisconnection(IRetryPolicy? retryPolicy)
Parameters
Type | Name | Description |
---|---|---|
IRetry |
retryPolicy | The policy that will be used to determine if reconnection should be attempted. |