vanniktech / rxbilling Goto Github PK
View Code? Open in Web Editor NEWReactive wrapper around the Android Billing API
License: Apache License 2.0
Reactive wrapper around the Android Billing API
License: Apache License 2.0
Hey,
i'm having following problem:
Your code only calls queryPurchaseHistoryAsync
documentation says:
Returns the most recent purchase made by the user for each SKU, even if that purchase is expired, canceled, or consumed.
and never queryPurchases
which i think would be the "right" call because using the first one you can't tell what the state of that purchase is (cancelled, refunded ...).
Just for context: we try to implement subscriptions without a server (still don't know if this is a good idea - the internet is full of contradictory information. Google says it should work but is not "secure")
So calling queryPurchaseHistoryAsync
might be ok if you can query your own server to check what is up with your purchase but i can't do that so i have to rely on the information google gives me.
Did you have any of those problems? How do you check the state of the purchase?
Developer payload sending in method purchase as second param not working, because is deprecated
https://developer.android.com/google/play/billing/developer-payload
Library: rxbilling-google-play-library-v6
Version: com.vanniktech:rxbilling-google-play-library-v6:0.9.0
Code
rxBilling.purchase(subscription, user.email)
.subscribe({
viewModel.input.startWait()
}, {
it.printStackTrace()
})
Backend get receipt sub
{
"startTimeMillis": "1702585622731",
"expiryTimeMillis": "1702586520385",
"autoRenewing": true,
"priceCurrencyCode": "BRL",
"priceAmountMicros": "35400000",
"countryCode": "BR",
"developerPayload": "",
"paymentState": 1,
"orderId": "GPA....",
"purchaseType": 0,
"acknowledgementState": 0,
"kind": "androidpublisher#subscriptionPurchase"
}
/**
* Purchases the given PurchaseAble, which can be an inapp purchase or a subscription.
* You can get an instance of PurchaseAble through the [queryInAppPurchases] or
* [querySubscriptions] method. Make sure that the billing for the type is supported by
* using [isBillingForInAppSupported] or [isBillingForSubscriptionsSupported].
* In case of an error a [RxBillingPurchaseException] will be emitted.
*
* @param purchaseAble the given PurchaseAble to purchase. Can either be an inapp purchase or a subscription.
* @param developerPayload custom developer payload that will be sent with
*/
@CheckReturnValue fun purchase(
purchaseAble: PurchaseAble,
developerPayload: String,
): Single<PurchaseResponse>
Is there a way to use this without providing an Activity
, with just a Context
?
There is no way to specify old SKU and proration mode as mentioned in docs
What do you think the better way to implement this? Optional BillingFlowParams.Builder
parameter in purchase
method? Or different upgradeSubscription
method?
Hello!
First thank you for uploading your library. I'm trying to implement billing with Rx and I think it will be very useful to me. It looks good, but I'm having trouble. When adding the last dependency in my .gradle (implementation 'com.vanniktech: rxbilling-google-play-library: 0.5.0'), despite synchronizing everything correctly, it seems that it does not recognize the library files. In particular I try to use RxBilling and it tells me that it does not exist. Do I have to do something else?
As an alternative, I tried to add version 4, despite being deprecated, and in this case it does recognize the files, but the problem is that when trying to recover current purchases it returns the following error: Support for pending purchases must be enabled. Enable this by calling 'enablePendingPurchases ()' on BillingClientBuilder. , but I don't know how to do it from RxBilling...
Thank you!
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
.github/workflows/build.yml
actions/checkout v3
gradle/wrapper-validation-action v1
gradle/gradle-build-action v2
actions/setup-java v3
.github/workflows/publish-release.yml
actions/checkout v3
actions/setup-java v3
gradle/gradle-build-action v2
.github/workflows/publish-snapshot.yml
actions/checkout v3
actions/setup-java v3
gradle/gradle-build-action v2
gradle.properties
settings.gradle
build.gradle
io.reactivex.rxjava2:rxjava 2.2.21
androidx.annotation:annotation 1.5.0
androidx.test.espresso:espresso-core 3.4.0
androidx.test.ext:junit 1.1.3
org.mockito:mockito-core 4.8.0
junit:junit 4.13.2
com.android.tools.build:gradle 7.3.1
com.vanniktech:gradle-code-quality-tools-plugin 0.22.0
com.vanniktech:gradle-maven-publish-plugin 0.22.0
app.cash.licensee:licensee-gradle-plugin 1.5.0
com.dropbox.dependency-guard:dependency-guard 0.3.2
rxbilling/gradle.properties
rxbilling/build.gradle
rxbilling-google-play-library-v3/gradle.properties
rxbilling-google-play-library-v3/build.gradle
com.android.billingclient:billing 3.0.3
rxbilling-google-play-library-v4/gradle.properties
rxbilling-google-play-library-v4/build.gradle
com.android.billingclient:billing 4.1.0
rxbilling-google-play-library-v5/gradle.properties
rxbilling-google-play-library-v5/build.gradle
com.android.billingclient:billing 5.0.0
rxbilling-testing/gradle.properties
rxbilling-testing/build.gradle
gradle/wrapper/gradle-wrapper.properties
gradle 7.5.1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.