Skip to content

Commit 49d1e74

Browse files
committed
inappbilling v16.1.1
1 parent e53d3a6 commit 49d1e74

File tree

95 files changed

+560
-116
lines changed

Some content is hidden

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

95 files changed

+560
-116
lines changed

docs/inappbilling/changelog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
### 2025.03.25 [v16.1.1]
2+
3+
```
4+
fix(android,playbilling): change subscription offer to correctly return id and token separately (resolves https://github.com/distriqt/ANE-InAppBilling/issues/625)
5+
fix(android): fix finish purchase null object handling (resolves https://github.com/distriqt/ANE-InAppBilling/issues/621)
6+
fix(docs,airpackage): correct missing documentation on Huawei configuration values
7+
feat(android,nowgg): release of nowgg integration
8+
```
9+
110
### 2024.12.11 [v16.0.0]
211

312
```

docs/inappbilling/huawei/huawei-appgallery.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ You will need the **"SHA-256"** fingerprint for Huawei services.
2222
macOS:
2323

2424
```
25-
keytool -exportcert -keystore PATH_TO_CERTIFICATE.p12 -storepass PASSWORD -list -v -storetype PKCS12
25+
keytool -keystore PATH_TO_CERTIFICATE.p12 -storepass PASSWORD -list -v -storetype PKCS12
2626
```
2727

2828

2929
windows:
3030

3131
```
32-
keytool.exe -exportcert -keystore PATH_TO_CERTIFICATE.p12 -storepass PASSWORD -list -v -storetype PKCS12
32+
keytool.exe -keystore PATH_TO_CERTIFICATE.p12 -storepass PASSWORD -list -v -storetype PKCS12
3333
```
3434

3535
>

docs/inappbilling/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,5 @@ You can purchase a license for using this extension:
5050

5151
[airnativeextensions.com](https://airnativeextensions.com/)
5252

53-
distriqt retains all copyright.
54-
5553

5654
![](images/promo.png)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Updating your application descriptor will insert the required `extensionID`'s and generate the manifest and info additions for your application.
2+
3+
You update your application descriptor by running:
4+
5+
```
6+
apm generate app-descriptor src/MyApp-app.xml
7+
```
8+
9+
Change the path (`src/MyApp-app.xml`) to point to your application descriptor.
10+
11+
:::caution
12+
This will modify your application descriptor replacing the manifest additions and info additions with the ones generated from `apm`.
13+
14+
You should backup your application descriptor before running this command to ensure you don't lose any information.
15+
16+
If you need to insert custom data into these sections see the guides for [Android](https://github.com/airsdk/apm/wiki/Usage-Generate#android) and [iOS](https://github.com/airsdk/apm/wiki/Usage-Generate#ios)
17+
:::
18+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
3+
4+
:::info
5+
Note: All of the commands below should be run in a terminal / command prompt in the root directory of your application, generally the level above your source directory.
6+
:::
7+
8+
import SetupAPM from '../../../_includes/apm/setup-apm.mdx'
9+
10+
<SetupAPM />
11+
12+
13+
### Install the extension
14+
15+
Install the package by running:
16+
17+
```
18+
apm install com.distriqt.InAppBilling-NowGG
19+
```
20+
21+
This will download and install the extension, required assets, and all dependencies.
22+
23+
Once complete `apm` will have created something like the following file structure:
24+
25+
```
26+
.
27+
|____ ane
28+
| |____ com.distriqt.InAppBilling.ane # InAppBilling extension
29+
| |____ [dependencies]
30+
|____ apm_packages # cache directory - ignore
31+
|____ project.apm # apm project file
32+
```
33+
34+
- Add the `ane` directory to your IDE. *See the tutorials located [here](/docs/tutorials/getting-started) on adding an extension to your IDE.*
35+
36+
:::info
37+
We suggest you use the locations directly in your builds rather than copying the files elsewhere. The reason for this is if you ever go to update the extensions using `apm` that these updates will be pulled into your build automatically.
38+
:::
39+
40+
41+
:::caution
42+
Only install one variant of an package. The base variant is installed when no variant is specified and cannot be included alongside another variant. You will likely get an error if you attempt to install multiple variants with `apm`
43+
:::
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
2+
### Extension IDs
3+
4+
The following should be added to your `extensions` node in your application descriptor to identify all the required ANEs in your application:
5+
6+
```xml
7+
<extensions>
8+
<extensionID>com.distriqt.InAppBilling</extensionID>
9+
<extensionID>com.distriqt.Core</extensionID>
10+
<extensionID>com.distriqt.playservices.Base</extensionID>
11+
<extensionID>com.google.android.play</extensionID>
12+
<extensionID>com.jetbrains.kotlin</extensionID>
13+
</extensions>
14+
```
15+
16+
17+
18+
### Android
19+
20+
#### Manifest Additions
21+
22+
now.gg requires a minimum sdk version of 24 so you should ensure your manifest is specifying at least this version.
23+
24+
```xml
25+
<uses-sdk android:minSdkVersion="24" />
26+
```
27+
28+
We also recommend adding the following queries to allow the extension to check for the availability of the service:
29+
30+
```xml
31+
<queries>
32+
<intent>
33+
<action android:name="gg.now.vending.billing.InAppBillingService.BIND"/>
34+
</intent>
35+
<package android:name="gg.now.billing.service2"/>
36+
</queries>
37+
```
38+
39+
Add the following inside the `application` node in your manifest additions:
40+
41+
```xml
42+
<!-- NOW GG -->
43+
<activity
44+
android:name="gg.now.billingclient.api.ProxyBillingActivity"
45+
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation|locale"
46+
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
47+
```
48+
49+
50+
##### Manifest Example
51+
52+
53+
```xml
54+
<android>
55+
<manifestAdditions><![CDATA[
56+
<manifest android:installLocation="auto">
57+
58+
<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="34" />
59+
60+
<uses-permission android:name="android.permission.INTERNET"/>
61+
62+
<application>
63+
64+
<!-- NOW GG -->
65+
<activity
66+
android:name="gg.now.billingclient.api.ProxyBillingActivity"
67+
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation|locale"
68+
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
69+
70+
</application>
71+
72+
</manifest>
73+
]]></manifestAdditions>
74+
</android>
75+
```
76+
77+
78+
### iOS
79+
80+
now.gg does not support iOS, look to the standard Apple In-App Purchase server for iOS support.
81+
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
2+
:::info
3+
The following guide is used to manually install the extension, download dependencies and update the application descriptor. We highly recommend installing extensions using `apm`. Using `apm` will automate the installation and automatically handle updates and dependencies along with greatly simplifying the application descriptor generation.
4+
:::
5+
6+
7+
To add the extension to your development environment. Download the `com.distriqt.InAppBilling.Samsung.ane` extension from the repository and then follow the tutorial located [here](/docs/tutorials/getting-started) to add the extension to your development environment.
8+
9+
10+
11+
### Dependencies
12+
13+
Many of our extensions use some common libraries, for example, the Android Support libraries.
14+
15+
We have to separate these libraries into separate extensions in order to avoid multiple versions of the libraries being included in your application and causing packaging conflicts. This means that you need to include some additional extensions in your application along with the main extension file.
16+
17+
You will add these extensions as you do with any other extension, and you need to ensure it is packaged with your application.
18+
19+
20+
#### Core ANE
21+
22+
The Core ANE is required by this ANE. You must include and package this extension in your application.
23+
24+
The Core ANE doesn't provide any functionality in itself but provides support libraries and frameworks used by our extensions.
25+
It also includes some centralised code for some common actions that can cause issues if they are implemented in each individual extension.
26+
27+
You can access this extension here: [https://github.com/distriqt/ANE-Core](https://github.com/distriqt/ANE-Core).
28+
29+
30+
31+
### Android Support
32+
33+
The Android Support libraries encompass the Android Support, Android X and common Google libraries.
34+
35+
These libraries are specific to Android. There are no issues including these on all platforms, they are just **required** for Android.
36+
37+
This extension requires the following extensions:
38+
39+
- [com.jetbrains.kotlin](https://github.com/distriqt/ANE-AndroidSupport/raw/master/lib/com.jetbrains.kotlin.ane)
40+
41+
You can access these extensions here: [https://github.com/distriqt/ANE-AndroidSupport](https://github.com/distriqt/ANE-AndroidSupport).
42+
43+
44+
45+
#### Google Play Services
46+
47+
This ANE requires usage of certain aspects of the Google Play Services client library.
48+
The client library is available as a series of ANEs that you add into your applications packaging options.
49+
Each separate ANE provides a component from the Play Services client library and are used by different ANEs.
50+
These client libraries aren't packaged with this ANE as they are used by multiple ANEs and separating them
51+
will avoid conflicts, allowing you to use multiple ANEs in the one application.
52+
53+
This ANE requires the following Google Play Services:
54+
55+
- [`com.distriqt.playservices.Base`](https://github.com/distriqt/ANE-GooglePlayServices/raw/master/lib/com.distriqt.playservices.Base.ane)
56+
- [`com.google.android.play`](https://github.com/distriqt/ANE-GooglePlayServices/raw/master/lib/com.google.android.play.ane)
57+
58+
You must include the above native extensions in your application along with this extension,
59+
and you need to ensure they are packaged with your application.
60+
61+
You can access the Google Play Services client library extensions here: [https://github.com/distriqt/ANE-GooglePlayServices](https://github.com/distriqt/ANE-GooglePlayServices).
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
title: now.gg Payments Module
3+
sidebar_label: Add the Extension
4+
---
5+
6+
:::info About
7+
now.gg provides flexible Payment solutions that enable seamless in-app purchases (IAP) for Native Android and Unity games on the now.gg platform.
8+
now.gg Payments offers a smooth and efficient way to sell digital content.
9+
:::
10+
11+
This section describes how to setup your AIR application to use now.gg In-App Purchase (IAP) with this extension.
12+
13+
14+
import Tabs from '@theme/Tabs'
15+
import TabItem from '@theme/TabItem'
16+
17+
import InstallAPM from './_includes/add-apm.mdx'
18+
import InstallManual from './_includes/add-manual.mdx'
19+
20+
import AppDescriptorAPM from './_includes/add-apm-appdescriptor.mdx'
21+
import AppDescriptorManual from './_includes/add-manual-appdescriptor.mdx'
22+
23+
24+
## Install
25+
26+
The simplest way to install and manage your AIR native extensions and libraries is to use the AIR Package Manager (`apm`). We highly recommend using `apm`, as it will handle downloading all required dependencies and manage your application descriptor (Android manifest additions, iOS info additions etc).
27+
28+
However you can choose to install it manually, as you would have done in the past.
29+
30+
<Tabs
31+
groupId="packagemanager"
32+
defaultValue="apm"
33+
values={[
34+
{label: 'APM', value: 'apm'},
35+
{label: 'Manual', value: 'manual'},
36+
]}>
37+
38+
<TabItem value="apm" >
39+
<InstallAPM/>
40+
</TabItem>
41+
<TabItem value="manual" >
42+
<InstallManual/>
43+
</TabItem>
44+
45+
</Tabs>
46+
47+
48+
## Application Descriptor
49+
50+
<Tabs
51+
groupId="packagemanager"
52+
defaultValue="apm"
53+
values={[
54+
{label: 'APM', value: 'apm'},
55+
{label: 'Manual', value: 'manual'},
56+
]}>
57+
58+
<TabItem value="apm" >
59+
<AppDescriptorAPM/>
60+
</TabItem>
61+
<TabItem value="manual" >
62+
<AppDescriptorManual/>
63+
</TabItem>
64+
65+
</Tabs>
66+
67+
68+
69+
## Checking for Support
70+
71+
You can use the `isSupported` flag to determine if this extension is supported on the current platform and device.
72+
73+
This allows you to react to whether the functionality is available on the device and provide an alternative solution if not.
74+
75+
76+
```actionscript
77+
if (InAppBilling.isSupported)
78+
{
79+
// Functionality here
80+
}
81+
```
82+
83+
:::note
84+
This only checks if there is some functionality supported, not whether a particular billing service is available.
85+
:::
86+
60.8 KB
Loading
485 KB
Loading

0 commit comments

Comments
 (0)