This is only possible if you use backend to process subscriptions. Then from your server you can make a request that will return you JSON with purchase information, where you can find paymentState
field.
Possible values:
- 0 - Payment pending
- 1 - Payment received
- 2 - Free trial
You can use it if you want to determine if the trial is active now. To determine if a trial was active in the past, your server should receive Real-time developer notifications and store information about purchased subscriptions.
For example, when you receive SUBSCRIPTION_PURCHASED
notification, you can make the same request as above, to retrieve information about purchase. In the JSON you'll get there will be priceAmountMicros
field. It should be 0
for trial. So you can store that on your server and check for it later.