在与IabHelper Android应用开始得到购买的物品详细 [英] get purchased item detail at start of app with IabHelper android

查看:785
本文介绍了在与IabHelper Android应用开始得到购买的物品详细的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经实现应用内我的应用程序中,有与电网的图像列表,当用户选择图像,如果用户已经购买该项目应该不会被调用一次,否则它应该叫做法

I have implemented In-App in my application in that there is list of images with grid when user select image if user has already purchased that item it should never called again otherwise it should called method of

   mHelper.launchPurchaseFlow(this, SKU_PREMIUM, RC_REQUEST,
                mPurchaseFinishedListener, "");

我已经成功地应用集成与我的应用程序,也物品被购买的,但我想知道或启动,如果该项目是购买不如果不是上述code应该否则所谓它应该允许购买下载该图片

i have successfully integrate in-app with my app and also item is being purchased but i want to know at start up if that item is purchased or not if not purchased than above code should be called otherwise it should allow to download that image

推荐答案

终于让我找到的,如果它已经购买或不是如何获得购买物品的信息化解决方案。

Finally i found solution of how to get information of purchased item if it is already purchased or not

    // subscriptions we own
IabHelper.QueryInventoryFinishedListener mGotInventoryListener = new IabHelper.QueryInventoryFinishedListener() {
    public void onQueryInventoryFinished(IabResult result,
            Inventory inventory) {
        if (result.isFailure()) {
            complain("Failed to query inventory: " + result);
            return;
        }

        mIsPremium = inventory.hasPurchase(SKU_PREMIUM); ------> By here you can get information 

    }
};

这篇关于在与IabHelper Android应用开始得到购买的物品详细的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆