Skip to content

Commit

Permalink
call bindService with applicationContext
Browse files Browse the repository at this point in the history
  • Loading branch information
jinliu9508 committed Dec 7, 2023
1 parent ad7bd62 commit 9e3c8b8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ internal class TrackGooglePurchase(
mServiceConn = serviceConn
val serviceIntent = Intent("com.android.vending.billing.InAppBillingService.BIND")
serviceIntent.setPackage("com.android.vending")
_applicationService.appContext.bindService(serviceIntent, serviceConn, Context.BIND_AUTO_CREATE)
_applicationService.appContext.applicationContext.bindService(serviceIntent, serviceConn, Context.BIND_AUTO_CREATE)
} else if (mIInAppBillingService != null) {
queryBoughtItems()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class BootUpReceiver : BroadcastReceiver() {
context: Context,
intent: Intent,
) {
if (!OneSignal.initWithContext(context)) {
if (!OneSignal.initWithContext(context.applicationContext)) {
return
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class FCMBroadcastReceiver : BroadcastReceiver() {
return
}

if (!OneSignal.initWithContext(context)) {
if (!OneSignal.initWithContext(context.applicationContext)) {
return
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class UpgradeReceiver : BroadcastReceiver() {
return
}

if (!OneSignal.initWithContext(context)) {
if (!OneSignal.initWithContext(context.applicationContext)) {
return
}

Expand Down

0 comments on commit 9e3c8b8

Please sign in to comment.