-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BackgroundFlushPolicy doesn't flush the Application Backgrounded event #868
Comments
I tried this custom flush policy but I'm still not seeing the class FlushAppBackgroundedPolicy extends FlushPolicyBase {
start() {
// no-op
}
onEvent(event: SegmentEvent): void {
if ('event' in event && event.event === 'Application Backgrounded') {
console.log({ event }); // is logged properly on background
this.shouldFlush.value = true;
}
}
end(): void {
// no-op
}
} |
@sregg Thanks for the report! Is this happening in iOS or Android (or both) ? |
I've only tried on iOS. I'll try Android tomorrow. |
It's also happening on Android. |
@sregg I'm wondering about this too. we upgraded from 1.5.2 to 2.10.1 a while back and have noticed a significant increase in delta between event and event_received. i can't seem to find any information about what default flush behavior is for startup and background events. should it be flushing by default in those cases or do you need to set |
To flush on background you have to add the background policy explicitly I think. |
Any update on this from the Segment team? |
Hi @sregg @ekallevig complete apologies here- we have had some turnover in the last year and this simply got lost in the shuffle. I wish I had a better excuse for you. It seems Oscar had plans to address this but I am not sure he got to it. If this is still an issue would it be possible for you to reach out to Apologies again for the delays. Looking forward to resolving this. |
Steps to reproduce
BackgroundFlushPolicy
to client flush policies (e.g.segmentClient.addFlushPolicy(new BackgroundFlushPolicy());
Expected behavior
Application Backgrounded
event is also visible in Segment's debuggerActual behavior
Application Backgrounded
event is only visible after you re-open the appThe text was updated successfully, but these errors were encountered: