Skip to content

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

Open
@Ethan1983

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

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;
        }
      });
    }

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions