Skip to content

Commit

Permalink
block app start if appLaunchedInForeground is not set.
Browse files Browse the repository at this point in the history
  • Loading branch information
martinhaintz committed Sep 16, 2024
1 parent 7d5e695 commit cd9bdd5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ class SentryFlutterPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {

val appStartMetrics = AppStartMetrics.getInstance()

if (!appStartMetrics.appLaunchedInForeground) {
Log.w("Sentry", "App not launched in Foreground")
result.success(null)
}

val appStartTimeSpan = appStartMetrics.appStartTimeSpan
val appStartTime = appStartTimeSpan.startTimestamp
val isColdStart = appStartMetrics.appStartType == AppStartMetrics.AppStartType.COLD
Expand Down

0 comments on commit cd9bdd5

Please sign in to comment.