-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[in_app_purchase] Add alternative billing apis for android #6056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 12 commits
953338a
8ab32cc
4d06253
8d95e87
3878b4f
e516655
c8efd99
3bd6a95
3e77c14
b77152b
8cacaef
d4c4454
2f91615
fe7a677
95214de
fd506c2
6415bee
448dd2c
1524fe0
7507f02
2ae9119
99b3baf
b72cd39
240df4a
0723af9
16ce293
dfbb6b7
d073552
8e041af
fe9d77e
31788de
31008fa
b59c645
7b6b7a2
b144067
8450aaa
9730db3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,9 +14,14 @@ final class BillingClientFactoryImpl implements BillingClientFactory { | |
|
||
@Override | ||
public BillingClient createBillingClient( | ||
@NonNull Context context, @NonNull MethodChannel channel) { | ||
@NonNull Context context, | ||
@NonNull MethodChannel channel, | ||
boolean enableAlternativeBillingOnly) { | ||
BillingClient.Builder builder = BillingClient.newBuilder(context).enablePendingPurchases(); | ||
|
||
if (enableAlternativeBillingOnly) { | ||
// https://developer.android.com/google/play/billing/alternative/alternative-billing-without-user-choice-in-app | ||
builder.enableAlternativeBillingOnly(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not an actionable comment, but: Interesting that the billing client builder example they show at the link doesn't call There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TBH I am not sure. Organizationally I think it should be safe to include because if the caller was going to use alternative billing only then there are no pending purchases to enable or if there are all that happens on the callers side since they are providing the billing implementation. |
||
} | ||
return builder.setListener(new PluginPurchaseListener(channel)).build(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: As a new feature it should be incrementing the "minor" version (which for <1.0 in Dart convention is the third instead of the second), so this should be
0.3.1
.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, and thank you for letting me know.
I do think that it is weird that0.3.0+19 is less than 0.3.1