For my Codename One app, I am trying to figure out whether I can tell if an in-app-purchase (non consumable) has already been bought on Android (code shown in my other SO question).
According to this 2014 question it seems that managed purchases are not supported on Android. However when I test
on Android it returns true, and I can buy an In-App-Purchase.
So managed purchases seem to be supported on Android. However
remains false even after successful purchase although this Google Group discussion
seems to say that
does work indeed.
I tried to reach the source code for that
but could not find anything usefull (maybe I did not find the right code pieces).
So I am completely at lost, since my code works on the simulator as expected but not on a real Android device (which could also be faulty). Consequently could someone tell me if
is working on Android (in that case my Android device is faulty) or if I have to implement some native Android code to do what
is expected to do ?
EDIT November 10th 2016 : Solved with suffix "_nonconsume
As written in the blog post @Shai showed
in his answer by default Google play considers the product as consumable. That's why in case of non consumable product
returned false. To make Google Play treat the In-App-Product as non-consumable, you have to use the suffix "_nonconsume" in the SKU name
in the developper console (eg : "myappfull_nonconsume"). Then wait a few hours after submitting your app to the alpha testing channel and when the app is available, Google play will remember the purchase and
will work as expected.
Any help appreciated,