How does a billing client know which Play Store account to query in Android?

76 views Asked by At

I'm trying to get a list of active subscriptions from a Play Store account within my app. I was wondering if there's something about the billing client that I'm unaware of that is causing my active subscription queries to only query from one account and not another Play Store account that is active.

    QueryPurchasesParams queryPurchasesParams = QueryPurchasesParams
                    .NewBuilder()
                     .SetProductType(BillingClient.ProductType.Subs)
                    .Build();
                    
                    billingClient.QueryPurchases(queryPurchasesParams, purchaseResponseListener);

This is the snippet that queries the purchases and I'm saving them into a list. Once the activity closes, I clear the list. I then attempt to switch accounts on the Play Store app, and then run the subscription activity to display a list for the account that is active but then it displays the previous one. Is this a misunderstanding of BillingClient, or is it something else I don't understand?

0

There are 0 answers