subscribe
Subscribes to a product, letting the library pick the offer (the offer whose id matches trialId if configured, otherwise Play's last offer).
See also
to subscribe to one specific offer.
Subscribes to one specific offer of a subscription product.
This is the method a multi-offer paywall needs. A single subscription product routinely carries several offers — a base plan, a 7-day free trial, a 50%-off introductory offer — and Play returns only the ones the user is actually eligible for. Enumerate them with getOffers, render them, then pass the token of the one the user chose.
When offerToken is null this behaves exactly like subscribe.
Return
a human-readable result string; "Billing flow started" on success.
Since
4.4.0
Parameters
the launching activity; must not be finishing.
subscription product id.
offer token from getOfferToken, or null to let the library choose.
Subscribes to the exact offer described by offer.
Return
a human-readable result string; "Billing flow started" on success.
Since
4.4.0
Parameters
the launching activity; must not be finishing.
an offer obtained from getOffers.