Skip to content

Commit b9c6abf

Browse files
committed
IMPORTANT: automatic confirmations are now the default
1 parent cdb034f commit b9c6abf

File tree

4 files changed

+19
-28
lines changed

4 files changed

+19
-28
lines changed

AndroidBillingLibrary/src/net/robotmedia/billing/BillingController.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -580,11 +580,10 @@ public static boolean registerObserver(IBillingObserver observer) {
580580
}
581581

582582
/**
583-
* Requests the purchase of the specified item. The transaction will not be
584-
* confirmed automatically.
583+
* Requests the purchase of the specified item. The transaction will be
584+
* confirmed automatically. If manual confirmation or a developer payload are required use {@link #requestPurchase(Context, String, boolean, String)} instead.
585585
* <p>
586-
* For subscriptions, use {@link #requestSubscription(Context, String)}
587-
* instead.
586+
* For subscriptions, use {@link #requestSubscription(Context, String)}.
588587
* </p>
589588
*
590589
* @param context
@@ -593,7 +592,7 @@ public static boolean registerObserver(IBillingObserver observer) {
593592
* @see #requestPurchase(Context, String, boolean)
594593
*/
595594
public static void requestPurchase(Context context, String itemId) {
596-
requestPurchase(context, itemId, false, null);
595+
requestPurchase(context, itemId, true /* confirm */, null);
597596
}
598597

599598
/**
@@ -626,16 +625,16 @@ public static void requestPurchase(Context context, String itemId, boolean confi
626625
}
627626

628627
/**
629-
* Requests the purchase of the specified subscription item. The transaction
630-
* will not be confirmed automatically.
628+
* Requests the purchase of the specified subscription item. The transaction will be
629+
* confirmed automatically. If manual confirmation or a developer payload are required use {@link #requestSubscription(Context, String, boolean, String)} instead.
631630
*
632631
* @param context
633632
* @param itemId
634633
* id of the item to be purchased.
635634
* @see #requestSubscription(Context, String, boolean, String)
636635
*/
637636
public static void requestSubscription(Context context, String itemId) {
638-
requestSubscription(context, itemId, false, null);
637+
requestSubscription(context, itemId, true /* confirm */, null);
639638
}
640639

641640
/**

AndroidBillingLibrary/src/net/robotmedia/billing/helper/AbstractBillingActivity.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,9 @@ protected void onDestroy() {
121121
public abstract void onRequestPurchaseResponse(String itemId, ResponseCode response);
122122

123123
/**
124-
* Requests the purchase of the specified item. The transaction will not be
125-
* confirmed automatically; such confirmation could be handled in
126-
* {@link AbstractBillingActivity#onPurchaseExecuted(String)}. If automatic
127-
* confirmation is preferred use
128-
* {@link BillingController#requestPurchase(android.content.Context, String, boolean)}
124+
* Requests the purchase of the specified item. The transaction will be
125+
* confirmed automatically. If manual confirmation is required use
126+
* {@link BillingController#requestPurchase(android.content.Context, String, boolean, String)}
129127
* instead.
130128
*
131129
* @param itemId
@@ -137,10 +135,8 @@ public void requestPurchase(String itemId) {
137135

138136
/**
139137
* Requests the purchase of the specified subscription item. The transaction
140-
* will not be confirmed automatically; such confirmation could be handled
141-
* in {@link AbstractBillingActivity#onPurchaseExecuted(String)}. If
142-
* automatic confirmation is preferred use
143-
* {@link BillingController#requestPurchase(android.content.Context, String, boolean)}
138+
* will be confirmed automatically. If manual confirmation is required use
139+
* {@link BillingController#requestSubscription(android.content.Context, String, boolean, String)}
144140
* instead.
145141
*
146142
* @param itemId

AndroidBillingLibrary/src/net/robotmedia/billing/helper/AbstractBillingFragment.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,9 @@ public void onDestroy() {
108108
public abstract void onRequestPurchaseResponse(String itemId, ResponseCode response);
109109

110110
/**
111-
* Requests the purchase of the specified item. The transaction will not be
112-
* confirmed automatically; such confirmation could be handled in
113-
* {@link AbstractBillingActivity#onPurchaseExecuted(String)}. If automatic
114-
* confirmation is preferred use
115-
* {@link BillingController#requestPurchase(android.content.Context, String, boolean)}
111+
* Requests the purchase of the specified item. The transaction will be
112+
* confirmed automatically. If manual confirmation is required use
113+
* {@link BillingController#requestPurchase(android.content.Context, String, boolean, String)}
116114
* instead.
117115
*
118116
* @param itemId
@@ -124,10 +122,8 @@ public void requestPurchase(String itemId) {
124122

125123
/**
126124
* Requests the purchase of the specified subscription item. The transaction
127-
* will not be confirmed automatically; such confirmation could be handled
128-
* in {@link AbstractBillingActivity#onPurchaseExecuted(String)}. If
129-
* automatic confirmation is preferred use
130-
* {@link BillingController#requestPurchase(android.content.Context, String, boolean)}
125+
* will be confirmed automatically. If manual confirmation is required use
126+
* {@link BillingController#requestSubscription(android.content.Context, String, boolean, String)}
131127
* instead.
132128
*
133129
* @param itemId

DungeonsRedux/src/net/robotmedia/billing/example/Dungeons.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ private void setupWidgets() {
144144

145145
public void onClick(View v) {
146146
if (mSelectedItem.managed != Managed.SUBSCRIPTION) {
147-
BillingController.requestPurchase(Dungeons.this, mSelectedItem.sku, true /* confirm */, null);
147+
BillingController.requestPurchase(Dungeons.this, mSelectedItem.sku);
148148
} else {
149-
BillingController.requestSubscription(Dungeons.this, mSelectedItem.sku, true /* confirm */, null);
149+
BillingController.requestSubscription(Dungeons.this, mSelectedItem.sku);
150150
}
151151
}
152152
});

0 commit comments

Comments
 (0)