Postingan

Menampilkan postingan dengan label billing

Advanced in-app billing: handling alternative purchase flows

Gambar
Posted by Oscar Rodriguez, Developer Advocate When designing and developing an app or game, at some point you may ask yourself if you want to monetize it. If you choose to do so by selling products via Google Play, you will most likely have a store screen that shows available items for sale, and use the Google Play Billing Library to display dialogs that allow your users to complete their purchase. While there is a more detailed explanation in the documentation and in the Billing Library TrivialDrive samples , the general flow is as follows: Call the launchBillingFlow() method from the UI thread to launch the Google Play purchase dialog. If the purchase was successful, Google Play calls the onPurchasesUpdated() method to deliver the result of the purchase operation. If your app has a server, we strongly recommend that you verify the purchase from your server by using the Subscriptions and In-App Purchases API . Acknowledge the purchase either with consumeAsync() for consumable it...

A better way to track your promotions on Google Play Billing

Posted by Neto Marin, Developer Advocate Promotions can be a valuable tool to increase user engagement or attract new users by offering content or features to a limited number of users free of charge. We are happy to share an improvement in the Google Play Developer API that makes it easier to track your promotions from your own backend. Starting today, the API for Purchases.products will return " Promo" as a new value for the field purchaseType when the user redeems a promo code. Now, the possible values are: 0. Test (test purchases) 1. Promo (Promo code redemption purchase) For purchases made using the standard in-app billing flow, the field will continue to not be set in the API response. Please note : This state is only returned by the Purchases.products API. For subscriptions you may use Free Trials to offer free of charge subscription periods. For more details about how to create and redeem promo codes, check the In-app Promotions documentation. For more detail...