1

I'm starting to make some in-app purchases on my future app, and i wish to ask some questions regarding the new API (3) of the in app billing library (shown here):

  1. google says (here) that there are no more unmanaged items. this means that in order to have multiple consumable items, the play store cannot hold a counter, so you need to either consume the purchase right when you put it in the app, or only when you need it.

    My question about it is how would you get the consumable items stay on multiple devices? for example, if the user purchased 2 health potions, and because of the new limitations, they both are stored only on the app itself of one device, how could the end user go to another device , run the app and see that he has 2 health potions?

  2. is it possible to make some purchases for free on some cases, programmatically ?

    it could be useful for testing or on some cases when i want to reward the user for something he has done . i might even want to do it completely transparent and without any dialogs.

    i know that there is a sandbox mode but that's only available by adding specific accounts as test accounts .

  3. the lecture speaks of a "developer payload" (here) that you can put on the purchases for better security. they said that the data should be an id of the user, but they don't say what id i should use (only gave an example of google plus , which many people don't have).

    my question is: what should be used for the "developer payload" ? if i use the sample, what do they use, and is it safe to use it or should i change it ?

    i also don't understand how could it be useful, since the play store should always hold data as to which user has which items, so how could the play store be fooled on this? or maybe they talk about protection from changing the apk of the app?

  4. is it possible to make a transaction of multiple purchases ? if so, can i hide those that don't cost money ? and if all are for free, maybe not show anything at all ?

android developer
  • 114,585
  • 152
  • 739
  • 1,270

1 Answers1

0

Answer 1)

The way I have found for the question 1 is given below.

if your application used server database(stored data on server using internet connection) then you can simply stored data for particular user,Like if user has purchased 2 health potions and when user trying to use that 2 health potion from the another device then simply checked it is purchased by that user previously or not. if it is already purchased by that user then simply restrict that user to purchase potions again.

Answer 2)

Google is provided trial period for the subscription product. so that user can purchase that item as $0.00 amount as a trial period and when time expired(time can be 7day or more) item can be changed it's type as subscription item with credit card information as like simple purchase flow.

but, you used word "pro grammatically and without any dialog" then according to my knowledge Google will not provide it for the single user or for the particular user. you can simply give trial period value in the Google console for the all application user.

check this link for more detail: "Free trials" http://developer.android.com/google/play/billing/billing_subscriptions.html#administering

Answer 3)

I would like to suggest you for the developer payload, first of all it is not mandatory you can pass either blank string or with developer payload. According to my knowledge it should be working like "security code" same as you given in the Google site while searching content "Some Random String".

how to use developer payload and what should be use for developer payload check this link

Developer payload is useful for the application?

I think it is working like security code like Random String, and while you retrieve data you can verify that item that was purchased is same or not so that if in case some kind of hacker can be redirect to the other product then you can check it at response time, is it the same product as you are going to purchased or not and user can be protect from unnecessarily withdrawn money from his account.

and also check given link I have explained more for the developer payload.

Community
  • 1
  • 1
Maulik
  • 3,316
  • 20
  • 31
  • 1.i need to have my own server for a feature that existed on the previous API ? how come? 2. no i don't want to give free trials. i wan to provide a free purchase (0 cost) on some cases, and since it's free, i wish to remove the need to show any dialog made by google. 3.i don't think it should be random, since users can install the same app on another device they own, so the payload would be different. the link said it can be random for consumable things, but in this case why even bother and put it since it would be consumed as soon as possible, or unavailable when going to another device... – android developer Jul 06 '13 at 09:00