Update permission
- Refactor the code to put function in terms of the game in
MainGameExt
- Review the flow of the In-app purchase :
- Request permission when the user want to purchase. If contact permission is:
- Yes: go to 2.
- No: nothing
- Already got: go to 2.
- Get payload variable construct with Google service and a special I Love key. Callback after stuff with Google Play Service:
- OK: go to 3
- KO: nothing
- Set up In App purchase by initialise
IabHelper
, treatment of the listenerOnIabSetupFinishedListener
:
- success: got to 4
- Query the inventory, treatment of the listener
QueryInventoryFinishedListener
:
- Already got premium: update UI
- No premium in inventory: launch purchase
- Launch purchase flow, treatment of the listener
OnIabPurchaseFinishedListener
:
- got premium: update UI