iteratehq / iterate-android

Iterate Android SDK
MIT License
3 stars 1 forks source link

[Feature request] Send an event when the survey is not published/no survey matches the event #84

Open maciejsurmacz opened 1 week ago

maciejsurmacz commented 1 week ago

A bit similar to https://github.com/iteratehq/iterate-android/issues/83

When the survey requested through sendEvent is unpublished, or there is no survey for a given event, the operation will fail silently. It would be useful if the app was informed of the failure so that an error message could be shown to the user when this happens.

msingleton commented 1 week ago

@maciejsurmacz this one is a bit trickier since surveys can be unpublished for many reasons (not reach to launch, the research is complete, etc) and events can continue to be sent to us so future surveys can be published to it without needing code level changes.

What's your use case specifically here where you'd want to show a message to the end user?

maciejsurmacz commented 1 week ago

I see, the situation we are trying to avoid (which is a bit of an edge case) is that the survey gets accidentally unpublished and when the users click on a Complete survey button, the app (from the user's perspective) does nothing (for instance, a loading spinner just keeps on spinning without ever going away). We don't expect this to ever happen in production if the surveys are managed correctly, it's more of a precaution.

msingleton commented 1 week ago

Yea, that makes sense. We'll noodle on options internally, it might be more of a solution to add some kind of "unpublish protection" to avoid those accidental unpublishings