Using In-App billing to purchase full version of t

2019-02-23 20:29发布

I want to integrate In-App billing in the free version of my game, to allow user purchase the full version from the free version itself. I already got In-App billing working and I could easily make additional items in game available. The problem is I don't know what to do to start download of full version of the game and to actually purchase the full version from the market.

1条回答
三岁会撩人
2楼-- · 2019-02-23 20:58

To the best of my understanding, you can't use IAB to purchase a different application (full vs free). It's only used for purchasing 'items' for that particular application. What you could do is use it to:

  1. verify a purchase of 'upgrade' to full app, and when you start up you re-verify each time locally, and if the upgrade is valid, you remove in-game advertising, so it's now the 'non-free' version. Something like that.
  2. verify purchase, and then start to download full content pack, 'locked' to the device.
  3. verify purchase, and then 'unlock' content already built-into the free version.

I'm guessing 1 and 3 will be most popular. 2 requires separate server for content, but once you have a server you can also better secure your purchases (have the server run the verify step, so your public key doesn't exist inside the app), and the content could be 'server-signed' for just that device/user-account (or something similar, so can't just copy content to another device).

查看更多
登录 后发表回答