Good afternoon, Guys, please help me, I need an example code in Kotlin. I have the simplest option: no authorization, no subscriptions, no Compose. Only three products (Consumables), my own layout with three buttons (for each product).
How can I get the price of a product and setOnClickListener so that the process of purchasing this product begins?
val tv_Crystals_100: TextView = findViewById(R.id.tv_Crystals_100) val tv_Crystals_200: TextView = findViewById(R.id.tv_Crystals_200) val tv_Crystals_500: TextView = findViewById(R.id.tv_Crystals_500)
Thanks for confirming you got it working! If you are able, please share what changes you had to make so that I can fix my original answer. If you are not able then no problem, I’m glad it’s working now.
Yes, of course, here is an example of code that works for me. Let me remind you that I have the simplest option. Three buttons, three products (Consumables), and my own layout.
If I have a mistake or something that can be improved, please write.
Now I'm sorting out errors when making a purchase. And I don’t quite understand what and how errors need to be handled. For example this: PurchasesErrorCode.OperationAlreadyInProgressError.
This parameter Purchases.logLevel = LogLevel.DEBUG is needed for debugging. What should this parameter be for shopping to work as usual?
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.