• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Issue in inapp billing v3 android

jyoti22

Lurker
Hi,

I am stuck in in app billing of a android product which is consumable.I am using managed product with multiple time purchase.

When internet break in between the purchasing process,a internet dialog box is showing,After some time,when internet comes dialog dismiss automatically,no reciept come and i am not able to consume without purchase token then again click on buy button,it shows "item already own".What should be done in that case.I use getpurchase method for getting purchase reciept it is also return null.
 
Well, if you are an author of application, it's simple.
When purchasing is started, save state of purchasing in Preferences. Something like this
0 - start of purchasing
1 - first state
2 - second state
...
n - receipt has been got.

When Internet connection lost, the procedure of purchasing is interrupted, Preferences holds last state before lost of connection.
Your application look at the Preferences and sees that purchasing was not finished. So application knows that purchasing has been interrupted and shows relevant information on screen. When Internet connection restored, application repeats purchasing.
 
Well, if you are an author of application, it's simple.
When purchasing is started, save state of purchasing in Preferences. Something like this
0 - start of purchasing
1 - first state
2 - second state
...
n - receipt has been got.

When Internet connection lost, the procedure of purchasing is interrupted, Preferences holds last state before lost of connection.
Your application look at the Preferences and sees that purchasing was not finished. So application knows that purchasing has been interrupted and shows relevant information on screen. When Internet connection restored, application repeats purchasing.
Hi,
I am using in app purchase v3 library for android.They are using local caching when internet lost.They all the purchase and dedcted money and we did not get reciept of purchase.i need solution for that.
 
Back
Top Bottom