Automatically send "app.foreground" and "app.background" session