Skip to content

Commit

Permalink
android: fix app lifecycle monitoring with typed config (#724)
Browse files Browse the repository at this point in the history
We should be registering the application for lifecycle callbacks in both the typed config and YAML config cases.

Related to https://github.com/lyft/envoy-mobile/pull/717/files.

Signed-off-by: Michael Rebello <me@michaelrebello.com>
Signed-off-by: JP Simard <jp@jpsim.com>
  • Loading branch information
rebello95 authored and jpsim committed Nov 29, 2022
1 parent 6f7a86d commit 11f5cfa
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public int runWithConfig(String configurationYAML, String logLevel) {

@Override
public int runWithConfig(EnvoyConfiguration envoyConfiguration, String logLevel) {
return this.runWithConfig(envoyConfiguration, logLevel);
AndroidAppLifecycleMonitor monitor = new AndroidAppLifecycleMonitor();
application.registerActivityLifecycleCallbacks(monitor);
return envoyEngine.runWithConfig(envoyConfiguration, logLevel);
}
}

0 comments on commit 11f5cfa

Please sign in to comment.