Backstory
I'm trying to implement Android's inapp billing for subscriptions. Surprisingly, It's going relatively smoothly, but I've hit a wall. What I'm trying to do is have multiple possible logins (using Google's standard stuff, which all works for now.
Here's my issue:
So when I log in to my app, I get this familiar screen.
If I choose Account B, Account B logs in, I check the token and it's all working fine.
Now, I want Account B to get a subscription.
Two things at this point, the amount on the subscription is wrong, but I'm taking that up with Google Play Services. The issue I'm concerned about is that it's talking about a Google Play Balance, and one that I know Account B doesn't have. So I click the drop down arrow, and lo and behold... it's trying to charge account A.
So my question is this.
In my flow (standard flow adapted from the Trvial Drive example in the SDK) where and how do I add code to make it use the account I just signed in instead of a different one?
I'm not seeing any points where I can pass a token or an ID, nothing that would help me. How does one do this?
** UPDATE 2017-05-26, 01:10 **
Google does not support choosing an account. Here's what I heard from their support team:
It is working as intended that you cannot choose from multiple Google accounts upon purchasing an in-app item and you can only pay using the account which installed the app.
Consider that an device has two accounts, account A and account B, and account A has installed the app. When you are logged into the device as B, you can still open the app but when you try to make a in-app item purchase, the payment can only be completed by account A. (In the Play Store payment window, account A is selected by default and there is no way to change it.)
So for now, we just have to have a single account. I have to rework my flow and explain to people that this just isn't the Google way.