Hi,

I used the Google's inapp purchase sample. I handled the purchase success
in the handler as per sample code. But for the first time when user adding
his credit card and immediately purchasing, sometimes I am not getting
success message due to card activation time or some other. Please anyone
provide a solution to handle the purchase response, if it's delayed by some
reasons. In the sample code, where I have to handle that?

For your info, after getting inside the mTransactionHandler , I switched to
another activity of the application to show the status of the purchase and
start the file download.

public Handler mTransactionHandler = new Handler(){
        public void handleMessage(android.os.Message msg) {
            /*Log.i("*********", "2Transaction complete");
            Log.i("**********", "2Transaction status:
"+BillingHelper.latestPurchase.purchaseState);
            Log.i("*************", "2Item purchased is:
"+BillingHelper.latestPurchase.productId);
            Log.i("*************", "Order id:
"+BillingHelper.latestPurchase.orderId);
            Log.i("*************", "Purchase time:
"+BillingHelper.latestPurchase.purchaseTime);
            Log.i("*************", "Notification id:
"+BillingHelper.latestPurchase.notificationId);*/
            if(BillingHelper.latestPurchase.isPurchased()){
                //Start the Download

                    String reference =
BillingHelper.latestPurchase.productId;
                   setPurchaseSuccessful(reference);
                }
            };
        };


Thanks.

On Sat, Jul 14, 2012 at 3:25 PM, tk <[email protected]> wrote:

> Hi,
>
> I integrated inapp billing in my app. My customers often getting problem
> for the very first time they are adding their credit card and purchasing.
> 2nd time purchase is good. Any one experienced this issue?
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to