capacitor-native-purchases 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/android/build.gradle
CHANGED
|
@@ -52,6 +52,7 @@ dependencies {
|
|
|
52
52
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
53
53
|
implementation project(':capacitor-android')
|
|
54
54
|
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
55
|
+
implementation 'com.android.billingclient:billing:7.1.1'
|
|
55
56
|
testImplementation "junit:junit:$junitVersion"
|
|
56
57
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
57
58
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
@@ -45,7 +45,7 @@ public class Purchases {
|
|
|
45
45
|
private String googleVerifyEndpoint = "";
|
|
46
46
|
private String googleBid = "";
|
|
47
47
|
|
|
48
|
-
public Purchases(
|
|
48
|
+
public Purchases(PurchasesPlugin plugin, BillingClient billingClient) {
|
|
49
49
|
|
|
50
50
|
this.billingClient = billingClient;
|
|
51
51
|
this.billingClient.startConnection(new BillingClientStateListener() {
|
|
@@ -19,7 +19,7 @@ import com.android.billingclient.api.PurchasesUpdatedListener;
|
|
|
19
19
|
@CapacitorPlugin(name = "Purchases")
|
|
20
20
|
public class PurchasesPlugin extends Plugin {
|
|
21
21
|
|
|
22
|
-
private
|
|
22
|
+
private Purchases implementation;
|
|
23
23
|
|
|
24
24
|
private BillingClient billingClient;
|
|
25
25
|
|
|
@@ -76,7 +76,7 @@ public class PurchasesPlugin extends Plugin {
|
|
|
76
76
|
.setListener(purchasesUpdatedListener)
|
|
77
77
|
.enablePendingPurchases()
|
|
78
78
|
.build();
|
|
79
|
-
implementation = new
|
|
79
|
+
implementation = new Purchases(this, billingClient);
|
|
80
80
|
|
|
81
81
|
}
|
|
82
82
|
|