Empty product list on QueryProducts in Delphi XE6 TInappPurchase on Android -


i developing inapp-purchase in delphi xe6. based on embarcadero documentation create inapppurchase component below:

        finapppurchase := tinapppurchase.create(self); {$ifdef android}         finapppurchase.productids.add(license5and);         finapppurchase.productids.add(license10and);         finapppurchase.productids.add(license20and);         finapppurchase.productids.add(license50and); {$endif} {$ifdef ios}         finapppurchase.productids.add(license5);         finapppurchase.productids.add(license10);         finapppurchase.productids.add(license20);         finapppurchase.productids.add(license50); {$endif}         finapppurchase.onsetupcomplete := inapppurchase1onsetupcomplete;         finapppurchase.onconsumecompleted := inapppurchase1consumecompleted;         finapppurchase.onerror := inapppurchase1error;         finapppurchase.onproductsrequestresponse := inapppurchase1productsrequestresponse;         finapppurchase.onpurchasecompleted := inapppurchase1purchasecompleted;         finapppurchase.onrecordtransaction := inapppurchase1recordtransaction;         finapppurchase.onverifypayload := inapppurchase1verifypayload;  {$ifdef android}         finapppurchase.applicationlicensekey := mylicensekeyfromgoogledeveloperconsole; {$endif} 

then in inapppurchase1onsetupcomplete called finapppurchase.queryproducts goes inapppurchase1productsrequestresponse , products , inavlidproductids both empty. don't know missed. appreciated.

i check products in google developer console of them 'active' , type of 'managed'.

p.s. code working perfect on ios device.

i lost lot of time understand problem. after studied source code have understand in android events asynchronous, must wait "queryproducts" result. in order fix problem created ttimer wait 5 second before read "inapppurchase.isproductpurchased"

(i'm sorry bad english)


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -