문제

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, "");

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 

    }
};
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top