Skip to content

Commit

Permalink
fix: Application Opened event not being fired (#409)
Browse files Browse the repository at this point in the history
When app moves from background to foreground.
  • Loading branch information
1abhishekpandey authored Mar 28, 2024
1 parent 546069b commit 76edd58
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ internal class ActivityBroadcasterPlugin(
private val lifecycleCallback by lazy {
object : Application.ActivityLifecycleCallbacks {
override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle?) {
if(analytics?.currentConfigurationAndroid?.trackLifecycleEvents == true &&
activityCount.get() == 0) {
broadCastApplicationStart()
}
}

override fun onActivityStarted(activity: Activity) {
incrementActivityCount()
if (analytics?.currentConfigurationAndroid?.recordScreenViews == true) {
broadcastActivityStart(activity)
}
if(analytics?.currentConfigurationAndroid?.trackLifecycleEvents == true &&
activityCount.get() == 1) {
broadCastApplicationStart()
}
}

override fun onActivityResumed(activity: Activity) {
Expand Down

0 comments on commit 76edd58

Please sign in to comment.