Reputation: 234847
The application licensing docs say that once the application is no longer refundable, the validity period of license server responses is "typically a number of days." This is rather vague, although I would imagine that it means "days, not weeks or months" (as opposed to "days, not minutes or hours").
Does anyone have actual data about the VT field values when the Android Market license server returns a LICENSED response?
Upvotes: 2
Views: 763
Reputation: 7718
My recent tests (yesterday) show that, for a non-refundable app, the VT timestamp is exactly 24 hours after the license timestamp.
I also saw a still-refundable JPY purchase where the VT timestamp was just under 2 hours after the license timestamp. Presumably that VT timestamp remains the same until the app is no longer refundable.
For when the app is refundable, I would not assume that all countries have the same 2 hour difference. But perhaps, for non-refundable apps, the 24 hours is constant regardless of country.
So my current hypothesis is that to detect whether an app purchase is still refundable, I check to see if the VT timestamp is less than 24 hours after the license timestamp.
By the way, the GT timestamp is always exactly 6 days after the VT timestamp regardless of whether the purchase is still refundable.
I'll update this answer if I get some new info.
Upvotes: 1
Reputation: 58371
In my experience the period is 14 days for a live application and 1 minute for a test response. It's possible to ignore the VT value and use your own timestamp (or add extra time to it) by altering the long value stored.
I've never seen these values documented and recall them from development around 3 months ago.
Upvotes: 5