Flush for Android apps
Engagement stats (Events, Screens, Sessions, APIs) and Logs that are recorded by your app are batched together in a single session, i.e, app foregroud to background. The data is then uploaded in Apptics server together on the next app launch. If the app is not launched to foreground again, it could take upto 1 hour (approximately) for data to be uploaded based on your network connectivity and battery health.
You can use the flush method to try to instantly sync the recorded engagement data.
CopiedApptics.flush()
Flush method has rate limiting implemented to prevent throttling. Calling the flush method in short intervals will make it ineffective.
Generally, crashes are also uploaded similarly to engagement data on next app launch or in background, if the app is not launched to foreground again for more than an hour.
You can instantly upload crashes once it has occurred. However, doing this may cause ANRs and result in duplicate crash reports.
Enable attemptInstantSync to sync the crashes instantly.
CopiedAppticsCrashTracker.attemptInstantSync = true