firebase / firebase/firebase-android-sdk

[In App Messaging] Ability to opt out of FIAM dismiss on outside taps

Open
#5,072 1 comment 0 reactions 0 assignees View on GitHub
api: inappmessaging type: feature request
Dominant language
Java
Stars
2.6k
Forks
710
Avg merge
2d 23h
Merged PRs (30d)
34

Description

## What feature would you like to see?

An ability to opt out of FIAM dismiss on outside taps for non-banner layouts in firebase console.

## How would you use it?

* Would indicate this (opt out boolean) in Firebase console while creating the layouts in `Style and content` section of compose campaign.
* When opted out, FIAM can be dismissed only by dismiss or close button. As is, users could accidentally tap outside the FIAM dialog and the campaign is lost. To make it worse, once impressed, it isn't shown again (when scheduled as once per device)

## Notes

Dismiss logic is implemented in `FirebaseInAppMessagingDisplay`

```java
if (!bindingWrapper.getConfig().backgroundEnabled()) {
bindingWrapper.getRootView().setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_OUTSIDE) {
if (callbacks != null) {
callbacks.messageDismissed(InAppMessagingDismissType.UNKNOWN_DISMISS_TYPE);
}
dismissFiam(activity);
return true;
}
return false;
}
});
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.