Wednesday, 15 April 2015

android - in-app-purchase - check for purchased items before initializing the app -



android - in-app-purchase - check for purchased items before initializing the app -

i have next problem:

my app downloadable free can upgraded through in-app-purchase. purchase working fine. i'm checking @ startup if app upgraded or not in order initialize free or upgraded features.

at default app assumes not upgraded, using bool set 'false' default. @ startup app queries purchased items , sets bool true if upgraded version purchased.

the problem connection google play service done asynchronously. means @ startup cases app considered not upgraded although is, because of asynchronous service connections takes long.

is possible wait service connection finish before checking app version? docs api-version 3 purchase informations cached locally. isn't possible retrieve cached informations without using asynchronous service connection?

of course of study save upgrade-informations myself using preferences if user likes install app on device upgraded version treated not upgraded. did faced same problem , found way solve issue?

if here:

it says "version 3 api calls serviced through cache lookups instead of through network connection google play".

meaning, goggle play service optimize requests homecoming cached results (if available), although happens asynchronously because of inter process communication between app , google play services.

i suggest, when app installed on new device. start if free version loaded while checking previous purchases in "background" , gracefully upgrade if user owns upgrade.

android in-app-purchase

No comments:

Post a Comment