Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private fun instantiateAndConnectToPlayBillingService() {
- playStoreBillingClient = BillingClient.newBuilder(application.applicationContext)
- .enablePendingPurchases() // required or app will crash
- .setListener(this).build()
- connectToPlayBillingService()
- }
- private fun connectToPlayBillingService(): Boolean {
- Log.d(LOG_TAG, "connectToPlayBillingService")
- if (!playStoreBillingClient.isReady) {
- playStoreBillingClient.startConnection(this)
- return true
- }
- return false
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement