The Google IAB dialog has the Google account name that will be associated 
with the purchase. In-app purchases are generally understood to be tied to 
your Google account and apps you download/purchase are associated with the 
account used in Google play. You could force your users to create user 
accounts with your service if you want to avoid this kind of Google 
associated purchasing altogether, but you are going to have a bit more 
friction for new users. You can just auto generate accounts for your app 
and associate purchases with said auto generated account, that way 
purchases are unique to a device rather than something that a user can take 
with them to a new device. Other than that, those are the only real 
options. If you need more explicit guaruntees of user behavior, force them 
to make accounts. If you don't need that, it is OK to use the current 
Google account.

On Sunday, September 29, 2013 3:44:34 PM UTC-4, Alexander Osmanov wrote:
>
> Yes, that is my problem if I want to bind server side to Google account. I 
> can't rely on first account being the one I should use and I don't think 
> that something like showing an account picker and saying "choose the 
> account you used for purchasing blah blah to create blah blah" is a good 
> idea. Users still will be able to choose another account and don't have it 
> on other device with all the consequences. That's why I'm so confused. If 
> only there was a way to know for sure which account is used for IAB.
>
> On Sunday, September 29, 2013 11:26:29 PM UTC+4, kj wrote:
>>
>> Weird, I didn't realize that the Google Play downloading account would be 
>> used, although this makes sense. Ultimately though the user making the 
>> purchase isn't configurable by your app since you'll be stuck with the 
>> downloading Google account anyway.
>>
>> On Sunday, September 29, 2013 2:40:11 PM UTC-4, Alexander Osmanov wrote:
>>>
>>> Kj, I did a research today, published my app through alpha testing on 
>>> Google Play and tried downloading it using several accounts. I can confirm 
>>> that IAB is NOT limited to primary Google account. Whichever account I use 
>>> for downloading the app from Google play is then used for IAB.
>>>
>>> On Saturday, September 28, 2013 5:41:45 PM UTC+4, kj wrote:
>>>>
>>>> As others mentioned, IAB is limited to the primary Google account. 
>>>> Users that need truly separated user accounts will use the multi-user 
>>>> accounts options on Jelly Bean tablets, so their primary Google accounts 
>>>> will be different. This isn't confusing: when you make a purchase with a 
>>>> Google account, it is tied to that account. If your web app/service has 
>>>> its 
>>>> own user account system, tie that transaction to that user account at 
>>>> purchase time or later on when that Google user makes an account. Your app 
>>>> and webapp should provide a way to view the IAPs for accounts so the user 
>>>> knows what they have purchased.
>>>>
>>>> On Thursday, September 26, 2013 6:20:30 AM UTC-4, Alexander Osmanov 
>>>> wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>>   I'm having a hard time with figuring out the right way to approach 
>>>>> handling in app purchases for users with multiple accounts. I am 
>>>>> using Appengine Endpoints to implement my server side API. This API 
>>>>> returns 
>>>>> some data to my users. As soon as user purchases a certain product API 
>>>>> will 
>>>>> return additional data. I want to make it more secure by enabling OAuth 
>>>>> authentication to my endpoints. So as soon as user purchases something it 
>>>>> is verified and remembered on a server. Thus my API endpoint will always 
>>>>> know what data to return to a particular user.
>>>>>
>>>>> But what should I do if a user has more than one account? I couldn't 
>>>>> find the way how to obtain account the app uses for IAP (according to 
>>>>> documentation it's the account used to download the app). So I either 
>>>>> have 
>>>>> to blindly pick first account or let user pick an account. But what if 
>>>>> they 
>>>>> pick another account and all their purchases would go to a different 
>>>>> account? This creates a lot of problems. For instance if user has only 
>>>>> one 
>>>>> account on another device it will either not have server side info 
>>>>> available or will not have Google Play recognizing as a buyer. Basically 
>>>>> we 
>>>>> will end up with two sources of info - Google Play and my server possibly 
>>>>> conflicting with each other because of accounts. 
>>>>>
>>>>> What makes problem even harder is that I don't want to force users 
>>>>> logging in using their account as this really doesn't add much value to 
>>>>> app 
>>>>> at the moment. But at the same I want to avoid just sending purchased 
>>>>> flag 
>>>>> to my API based on some my local data (which can be compromised).
>>>>>
>>>>> What is the appropriate strategy for handling this I would say quite 
>>>>> common situation? If only there was a way to know for sure which account 
>>>>> the app used for purchases, all my problems would be gone.
>>>>>
>>>>> Thanks,
>>>>> Alex.
>>>>>
>>>>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to