Skip to content

Commit 276cb0b

Browse files
committed
nfc v5.6.0
1 parent 2e47d5f commit 276cb0b

File tree

86 files changed

+2644
-951
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+2644
-951
lines changed

docs/inappbilling/_includes/add-manual.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,6 @@ This ANE requires the following Google Play Services:
6161
You must include the above native extensions in your application along with this extension,
6262
and you need to ensure they are packaged with your application.
6363

64-
You can access the Google Play Services client library extensions here: [https://github.com/distriqt/ANE-GooglePlayServices](https://github.com/distriqt/ANE-GooglePlayServices).
64+
You can access the repositories for these client library extensions here:
65+
- [Google Play Services](https://github.com/distriqt/ANE-GooglePlayServices).
66+
- [Google Play](https://github.com/airnativeextensions/ANE-GooglePlay)

docs/inappbilling/add-the-extension.mdx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Add the Extension
3-
sidebar_label: Add the Extension
3+
sidebar_label: AIR
44
---
55

66
import Tabs from '@theme/Tabs'
@@ -48,14 +48,12 @@ However you can choose to install it manually, as you would have done in the pas
4848
{label: 'APM', value: 'apm'},
4949
{label: 'Manual', value: 'manual'},
5050
]}>
51-
52-
<TabItem value="apm" >
51+
<TabItem value="apm" >
5352
<InstallAPM/>
54-
</TabItem>
55-
<TabItem value="manual" >
53+
</TabItem>
54+
<TabItem value="manual" >
5655
<InstallManual/>
57-
</TabItem>
58-
56+
</TabItem>
5957
</Tabs>
6058

6159

@@ -69,13 +67,12 @@ However you can choose to install it manually, as you would have done in the pas
6967
{label: 'Manual', value: 'manual'},
7068
]}>
7169

72-
<TabItem value="apm" >
70+
<TabItem value="apm" >
7371
<AppDescriptorAPM/>
74-
</TabItem>
75-
<TabItem value="manual" >
72+
</TabItem>
73+
<TabItem value="manual" >
7674
<AppDescriptorManual/>
77-
</TabItem>
78-
75+
</TabItem>
7976
</Tabs>
8077

8178

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
title: Add the Plugin
3+
sidebar_label: Unity
4+
---
5+
6+
First step is always to add the plugin to your development environment.
7+
8+
9+
## Asset Store
10+
11+
Open the Asset Store in your browser and add the plugin to your assets.
12+
13+
Open the Package Manager (Window > Package Manager) in the Unity Editor and select the "My Assets" section. Select the plugin, and click Import.
14+
15+
16+
## Manual Installation
17+
18+
In unity you import the package by selecting `Assets / Import Package / Custom Package ...` and then browsing to the unity plugin package file: `com.distriqt.InAppBilling.unitypackage`.
19+
20+
![](images/unity-import-package.png)
21+
22+
You can manually download the extension from our repository:
23+
24+
- https://github.com/distriqt/ANE-InAppBilling
25+
26+
27+
28+
## Import the Plugin
29+
30+
31+
This will present the import dialog and display all the files for the plugin, make sure all the files are selected.
32+
33+
The plugin will be added to your project and you can now use the plugins functionality in your application.
34+
35+
36+
:::note Proguard
37+
If you are using a custom proguard configuration you may need to add the following line to ensure the interface class for the plugin is accessible to unity at runtime.
38+
39+
```
40+
-keep class com.distriqt.extension.inappbilling.InAppBillingUnityPlugin {*;}
41+
```
42+
:::
43+
44+
45+
46+
## Checking for Support
47+
48+
You can use the `isSupported` flag to determine if this extension is supported on the current platform and device.
49+
50+
This allows you to react to whether the functionality is available on the device and provide an alternative solution if not.
51+
52+
53+
```csharp
54+
if (InAppBilling.isSupported)
55+
{
56+
// Functionality here
57+
}
58+
```
59+
60+
61+
62+
63+

docs/inappbilling/application-receipt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ It is up to you to decide if this is required for your situation.
2424

2525

2626
:::info
27-
The "Application Receipt" variant performs local validation of the application receipt to retrieve purchase information and makes this information available through the [Get Purchases](get-purchases.md) API.
27+
The "Application Receipt" variant performs local validation of the application receipt to retrieve purchase information and makes this information available through the [Get Purchases](get-purchases) API.
2828
:::
2929

3030

Lines changed: 98 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ title: Setup Billing Service
33
sidebar_label: Setup Billing Service
44
---
55

6+
import Tabs from '@theme/Tabs'
7+
import TabItem from '@theme/TabItem'
8+
69
## Billing Service
710

811
Before starting here you should make sure you have already setup the service for your application
@@ -43,17 +46,21 @@ sure that you handle the event appropriately.
4346

4447
## Events
4548

49+
<Tabs groupId="framework" defaultValue="air" values={[
50+
{label: 'AIR', value: 'air'},
51+
{label: 'Unity', value: 'unity'},
52+
]}>
53+
<TabItem value="air" >
54+
4655
We suggest you listen to the following four events before calling setup:
4756

4857
- `InAppBillingEvent.SETUP_SUCCESS`: Dispatched when setup is successfully completed;
4958
- `InAppBillingEvent.SETUP_FAILURE`: Dispatched when there was an error during setup;
5059
- `PurchaseEvent.PURCHASES_UPDATED`: Dispatched if there are pending purchases needing to be processed;
51-
- `PurchaseRequestEvent.SHOULD_ADD_PURCHASE`: Dispatched if the app was launched from an AppStore promotional purchase (see [Promotions](promotions.md)).
60+
- `PurchaseRequestEvent.SHOULD_ADD_PURCHASE`: Dispatched if the app was launched from an AppStore promotional purchase (see [Promotions](promotions)).
5261

5362

5463
```actionscript
55-
InAppBilling.service.addEventListener( InAppBillingEvent.SETUP_SUCCESS, setup_successHandler );
56-
InAppBilling.service.addEventListener( InAppBillingEvent.SETUP_FAILURE, setup_failureHandler );
5764
InAppBilling.service.addEventListener( PurchaseEvent.PURCHASES_UPDATED, purchases_updatedHandler );
5865
InAppBilling.service.addEventListener( PurchaseRequestEvent.SHOULD_ADD_PURCHASE, purchaseRequest_shouldAddPurchaseHandler );
5966
@@ -63,12 +70,38 @@ InAppBilling.service.setup(
6370
);
6471
```
6572

73+
</TabItem>
74+
<TabItem value="unity" >
75+
76+
We suggest you listen to the following four events before calling setup:
77+
78+
- `InAppBilling.Instance.Events.OnPurchasesUpdated`: Dispatched if there are pending purchases needing to be processed;
79+
- `InAppBilling.Instance.Events.OnShouldAddPurchase`: Dispatched if the app was launched from an AppStore promotional purchase (see [Promotions](promotions));
80+
81+
```csharp
82+
InAppBilling.Instance.Events.OnPurchasesUpdated += OnPurchasesUpdated;
83+
InAppBilling.Instance.Events.OnShouldAddPurchase += OnShouldAddPurchase;
84+
85+
InAppBilling.Instance.Setup(
86+
new BillingService()
87+
.SetGooglePlayPublicKey( GOOGLE_PLAY_INAPP_BILLING_KEY )
88+
);
89+
```
90+
91+
</TabItem>
92+
</Tabs>
6693

6794

6895
## Service Type
6996

7097
The billing service type will be automatically selected based on the default of the current device platform. However we suggest you specify the service type in your `BillingService` using `setServiceType()` to specify a particular service:
7198

99+
<Tabs groupId="framework" defaultValue="air" values={[
100+
{label: 'AIR', value: 'air'},
101+
{label: 'Unity', value: 'unity'},
102+
]}>
103+
<TabItem value="air" >
104+
72105
```actionscript
73106
var service:BillingService = new BillingService( )
74107
.setServiceType( InAppBillingServiceTypes.GOOGLE_PLAY_INAPP_BILLING )
@@ -77,8 +110,22 @@ var service:BillingService = new BillingService( )
77110
var success:Boolean = InAppBilling.service.setup( service );
78111
```
79112

113+
</TabItem>
114+
<TabItem value="unity" >
115+
116+
```csharp
117+
var service = new BillingService()
118+
.SetServiceType( InAppBillingServiceTypes.GOOGLE_PLAY_INAPP_BILLING )
119+
.SetGooglePlayPublicKey( GOOGLE_PLAY_INAPP_BILLING_KEY );
120+
InAppBilling.Instance.Setup( service );
121+
```
122+
123+
</TabItem>
124+
</Tabs>
125+
126+
80127
:::note
81-
You do not need to call `setServiceType`.
128+
You do not need to call `setServiceType()`.
82129
If you do not call it then the default for the current platform will be used,
83130
i.e. Apple InApp Purchases on iOS and Google's Play InApp Billing on Android.
84131

@@ -93,6 +140,13 @@ Once you have completed setup it is important to check whether the user on the c
93140

94141
For example, the latest version of Play Billing is only supported with an updated version of the Play Store app. If an older version is on the user's device the billing api will not be available.
95142

143+
144+
<Tabs groupId="framework" defaultValue="air" values={[
145+
{label: 'AIR', value: 'air'},
146+
{label: 'Unity', value: 'unity'},
147+
]}>
148+
<TabItem value="air" >
149+
96150
To check the status call the `checkAvailability()` function and await the result. This function will dispatch an `AvailabilityEvent.COMPLETE` event or call a callback function passed as the parameter to the function.
97151

98152
Callback:
@@ -108,7 +162,6 @@ InAppBilling.service.checkAvailability(
108162

109163
Event:
110164

111-
112165
```actionscript
113166
InAppBilling.service.addEventListener( AvailabilityEvent.COMPLETE, function( event:AvailabilityEvent ):void
114167
{
@@ -118,12 +171,37 @@ InAppBilling.service.checkAvailability();
118171
```
119172

120173

174+
121175
The `availability` value will be one of the values defined in the `InAppBillingAvailability` class:
122176

177+
- `InAppBillingAvailability.AVAILABLE`: Service is available for products and purchases;
178+
- `InAppBillingAvailability.NOT_AVAILABLE`: Service is unavailable on the device;
179+
- `InAppBillingAvailability.STORE_UPGRADE_REQUIRED`: An update is required to the store application for this service
180+
181+
182+
183+
</TabItem>
184+
<TabItem value="unity" >
185+
186+
187+
To check the status call the `CheckAvailability()` function and await the result.
188+
189+
```csharp
190+
InAppBilling.Instance.CheckAvailability(
191+
(e) =>
192+
{
193+
Debug.Log( "availability = " + e.availability );
194+
}
195+
);
196+
```
197+
The `e.availability` value will be one of the values defined in the `InAppBillingAvailability` class:
198+
123199
- `InAppBillingAvailability.AVAILABLE`: Service is available for products and purchases;
124200
- `InAppBillingAvailability.NOT_AVAILABLE`: Service is unavailable on the device;
125201
- `InAppBillingAvailability.STORE_UPGRADE_REQUIRED`: An update is required to the store application for this service;
126202

203+
</TabItem>
204+
</Tabs>
127205

128206
You should handle the response as required and inform your users if purchasing isn't available or steps to upgrade the store application.
129207

@@ -138,10 +216,24 @@ It is equally appropriate to handle those error events however we suggest an upf
138216

139217
## Pending Purchases
140218

141-
Note that the pending purchases may not be available to you at the `InAppBillingEvent.SETUP_SUCCESS` event, as they may be updated after setup has completed. This is particularly true on iOS/tvOS where the payment queue update (which populates the pending purchases) will occur a short time after setup succeeds.
219+
<Tabs groupId="framework" defaultValue="air" values={[
220+
{label: 'AIR', value: 'air'},
221+
{label: 'Unity', value: 'unity'},
222+
]}>
223+
<TabItem value="air" >
224+
225+
Note that the pending purchases may not be available to you at the `InAppBillingEvent.SETUP_SUCCESS` event, as they may be updated after setup has completed.
226+
This is particularly true on iOS/tvOS where the payment queue update (which populates the pending purchases) will occur a short time after setup succeeds.
142227

143228
This update will be indicated by a `PurchaseEvent.PURCHASES_UPDATED`, indicating there are purchases to process.
144229

230+
</TabItem>
231+
<TabItem value="unity" >
145232

233+
Note that the pending purchases may not be available to you after setup is complete, as they may be updated after this point.
234+
This is particularly true on iOS/tvOS where the payment queue update (which populates the pending purchases) will occur a short time after setup succeeds.
146235

236+
This update will be indicated by an `OnPurchasesUpdated` event, indicating there are purchases to process.
147237

238+
</TabItem>
239+
</Tabs>

docs/inappbilling/catappult/catappult.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This extension implements Catappult's Native Android Billing and not the One-Ste
2323

2424
## Setting up a Billing Service
2525

26-
> The following is in addition to the documentation in [Setting up a Billing Service](../billing-service.md).
26+
> The following is in addition to the documentation in [Setting up a Billing Service](../billing-service).
2727
2828
When setting up your service you will need to specify the `InAppBillingServiceTypes.CATAPPULT_NATIVE_BILLING` service type and provide your Catappult Public key. The public key is used to verify purchases to provide a level of fraud protection:
2929

0 commit comments

Comments
 (0)