does anyone know how to get active subscription when more than 1 user accounts are logged in in Play Store? I've followed the steps in the documentation, it works normal when only 1 user logged in in the Play Store
Here is what i've done
val billingClient = BillingClient.newBuilder(context).setListener(purchasesUpdateListener)
.enablePendingPurchases()
.build()
//Starting connection
billingClient.startConnection(object : BillingClientStateListener {
override fun onBillingSetupFinished(billingResult: BillingResult) {
queryPurchasesAsync()
queryPurchaseHistoryAsync()
}
override fun onBillingServiceDisconnected() {
//Do something to reconnect
}
})
fun queryPurchasesAsync(){
billingClient?.queryPurchasesAsync(QueryPurchasesParams.newBuilder()
.setProductType(BillingClient.ProductType.SUBS)
.build()
) { result, purchases ->
//Process puchases data
//Result is always ok
//purchases always return empty when 2 users are logged in in the Play Store, but return list of active subscription when only 1 user logged in in the play store
}
}