Skip to content

Commit 9cde642

Browse files
authored
Merge pull request #77 from cafebazaar/fix-set-component
Use setComponent
2 parents 33c4efc + 5682c4b commit 9cde642

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

poolakey/src/main/java/ir/cafebazaar/poolakey/billing/connection/ServiceBillingConnection.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import ir.cafebazaar.poolakey.config.PaymentConfiguration
3232
import ir.cafebazaar.poolakey.constant.BazaarIntent
3333
import ir.cafebazaar.poolakey.constant.Billing
3434
import ir.cafebazaar.poolakey.constant.Const.BAZAAR_PACKAGE_NAME
35+
import ir.cafebazaar.poolakey.constant.Const.BAZAAR_PAYMENT_SERVICE_CLASS_NAME
3536
import ir.cafebazaar.poolakey.exception.BazaarNotFoundException
3637
import ir.cafebazaar.poolakey.exception.DisconnectException
3738
import ir.cafebazaar.poolakey.exception.IAPNotSupportedException
@@ -65,7 +66,10 @@ internal class ServiceBillingConnection(
6566
callbackReference = WeakReference(callback)
6667
contextReference = WeakReference(context)
6768

68-
return Intent(BILLING_SERVICE_ACTION).apply { `package` = BAZAAR_PACKAGE_NAME }
69+
return Intent(BILLING_SERVICE_ACTION).apply {
70+
`package` = BAZAAR_PACKAGE_NAME
71+
setClassName(BAZAAR_PACKAGE_NAME, BAZAAR_PAYMENT_SERVICE_CLASS_NAME)
72+
}
6973
.takeIf(
7074
thisIsTrue = {
7175
context.packageManager.queryIntentServices(it, 0).isNullOrEmpty().not()

poolakey/src/main/java/ir/cafebazaar/poolakey/constant/Const.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ package ir.cafebazaar.poolakey.constant
22

33
internal object Const {
44
const val BAZAAR_PACKAGE_NAME = "com.farsitel.bazaar"
5+
const val BAZAAR_PAYMENT_SERVICE_CLASS_NAME =
6+
"com.farsitel.bazaar.inappbilling.service.InAppBillingService"
57
}

0 commit comments

Comments
 (0)