better-rail / app

An alternative mobile client for Israel Railways
https://better-rail.co.il
GNU Affero General Public License v3.0
150 stars 27 forks source link

Fix android tip jar refunds #341

Closed guytepper closed 1 year ago

guytepper commented 1 year ago

Tipping on Android were always refunded after a few days. The reason is that we didn't flush the purchase ("acknowledge" it to the play store):

your app must then acknowledge the purchase. This acknowledgement communicates to Google Play that you have granted entitlement for the purchase.

We had the flushing mechanism set in the TipJarScreen, but putting it there will possibly hav the flushing effect not run (if the user has exit the screen before it ran, or for whatever reason else. Putting in the main App component will ensure it'll be flushed, either in the current session or in the next app relaunch.