getPurchase返回第一个订阅而不是最后一个订阅

时间:2016-11-06 05:08:11

标签: android android-billing android-inapp-purchase

我在Android中使用订阅模式。当我查询库存时,监听器如下

IabHelper.QueryInventoryFinishedListener mGotInventoryListener = new IabHelper.QueryInventoryFinishedListener() {
        public void onQueryInventoryFinished(IabResult result, Inventory inventory) {
            Log.d(TAG, "Query inventory finished.");
            if (result.isFailure()) {
                mAct.alert("Failed to query inventory: " + result, true);
                return;
            }

            Log.d(TAG, "Query inventory was successful.");

            // Do we have the premium upgrade?
            Purchase premiumPurchase = inventory.getPurchase(SKU_PREMIUM);

此处getPurchase返回订阅的初始日期,即GPA.232423423423423.0

如何获取最新订阅的购买信息(即 GPA.232423423423423.7)

我需要知道最新的订阅日期而不是第一次

谢谢

0 个答案:

没有答案