apptentive / apptentive-android

Apptentive Android SDK
http://www.apptentive.com
BSD 3-Clause "New" or "Revised" License
65 stars 64 forks source link

Apptentive dashboard remains unchanged when App is moved background and events are triggered #224

Closed Deepa-3010 closed 3 years ago

Deepa-3010 commented 3 years ago

Hi Apptentive Team,

Our problem statement is that we want to trigger an Apptentive event when the app is in the background. We observe that though the event gets triggered while the count of the Event on the Apptentive dashboard remains unchanged even after a considerable time gap.

The count of the event on the Apptentive dashboard changes only when the App is moved to the foreground.

Does the Apptentive dashboard updates only when the app is in the foreground?

CaseyApptentive commented 3 years ago

Hi @Deepa-3010 ! Great question.

Our SDK is really designed for Events to be engaged while the app is in the foreground, though it may be possible to make them fire while the app is opened but in the background.

What your seeing seems to be expected behavior based on the design.

We designed it this way because Events firing in the background can inadvertently lead to attempting to present dialogs to customers at a bad time and place. For example, if the app is backgrounded and an Event is used for "Where" targeting, it may be possible to actually show a dialog to a customer. And philosophically, Apptentive is about showing the right customers the right dialog at a specific time and place -- and when the app is backgrounded, the dialog will very likely interrupt or catch customers at a bad time/place, leading to frustrated customers and negative feedback.

That said, in edge cases, it may make sense for some apps to capture background Events and use them for "Who" targeting. For example, if you have a music app and want to target based on how many songs that a customer plays while the app is backgrounded.

In this case, like you saw, we'll send the Event counts once the app is once again foregrounded.

Let me know if you have any further questions.