-
Notifications
You must be signed in to change notification settings - Fork 24
7. Query User's Subscribed Products
Saeed Moradi edited this page Feb 23, 2022
·
1 revision
You can query user's subscribed products by using getSubscribedProducts
function in Payment
class:
payment.getSubscribedProducts {
querySucceed { subscribedProducts ->
...
}
queryFailed { throwable ->
...
}
}
getSubscribedProducts
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.getSubscribedProducts()
.subscribe({ subscribedProducts ->
...
}, { throwable ->
...
})