Android Question Google Billing Problem

Eugene Gilmore

New Member
Licensed User
Longtime User
Hi everyone.

I have a problem that I do not know how to tackle. I have managed to integrate Google Billing to the point that I can retrieve the subscription plans and display them as buttons for the user to select:

1733327582848.png

There is even a trial subscription which has disappeared after the trial time expired.

When I click on a button a LaunchBillingFlow is initiated and Google Play displays the selected option and
after confirming the selection, control is returned to App that processing the "PurchasesUpdated" event and
the purchase is completed.

Now, I would like to enquire from Google, which subscription has been made to activate according features.

Using QueryPurchases("subs")) all i get is that 1 purchase has been made and the name of the subscription,
but no information on the offer, which actually is the features to activate.

I read that there is no way to obtain the info. on what was ordered through Google Billing.

(I could save which button was pushed, but the app is transferred to another phone, that information is lost.)

To sum it up: How do I determine what was ordered?

I would so much appreciate any help.

Thanks so much in advance.

Regards
Gene
 
Last edited:

Eugene Gilmore

New Member
Licensed User
Longtime User
Hi.

Well, the problem, or I should say my problem, is that I show buttons for the different "offers" that each subscription has. After the user has selected an offer, I send the offerToken to google to start the purchasing.

(Meanwhile I am receiving the billing1_PurchasesUpdated event, although I initiated it from billing2 on another page - no billing2_PurchasesUpdated as expected!)

When checking for active subscriptions with QueryPurchases only the Purchase object is returned and it only contains the SKU and purchaseTime and purchaseToken.

Now I wanted to indicate, on my page with all the offers, which offer was selected, i.e. what was the offerToken used.
At this point I am simply giving in to Google.

I am happy with what I have. :cool:

Erel, it has been fun working with your B4X system. If this app is somewhat successful I will also make it available in B4I.
Thank in for your help.
 
Upvote 0
Top