How to create non-consumable IAP and restore it on Android?

a possible solution is explained in this thread.