I have been trying to check if a user has subscribed a google product of my app. I have tried the following ways:
Bundle ownedItems = mService.getPurchases(3, getPackageName(),
"inapp", null);
if (ownedItems != null) {
int response = ownedItems.getInt("RESPONSE_CODE");
if (response == 0) {
ArrayList ownedSkus = ownedItems
.getStringArrayList("INAPP_PURCHASE_ITEM_LIST");
This always returns ownedSku count as 0 (ie, no subscribed items are returning from play service)
also
isSkuPurchased = inventory.hasPurchase("MY_SKU_VALUE");
By this way, if my product is not available in inventroy for purchase. But this always return true. (ie, the item is still not purchased)
I have been testing this with logs in alpha releases. Please help me here. I wonder is there a way to get the subscribed products from play service?
Any help is appreciated. Thanks in Advance!!