-
Notifications
You must be signed in to change notification settings - Fork 22
6. Query User's Purchased Products
Saeed Moradi edited this page Feb 23, 2022
·
1 revision
You can query user's purchased products by using getPurchasedProducts
function in Payment
class:
payment.getPurchasedProducts {
querySucceed { purchasedProducts ->
...
}
queryFailed { throwable ->
...
}
}
getPurchasedProducts
runs on a background thread and notifies you about the query result in the main thread, this means that you don't have to handle threading by your self.
payment.getPurchasedProducts()
.subscribe({ purchasedProducts ->
...
}, { throwable ->
...
})