question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

159135253: Trigger FirebaseInAppMessagingClickListener. messageClicked when action is empty

See original GitHub issue

What feature would you like to see?

Invoke FirebaseInAppMessagingClickListener.messageClicked for use case when you don’t want to trigger browser intent and you are interested only to handle other data (such as key-value map defined in the campaign)

As a user, I don’t want to trigger any URL specific browser intent when i click my In App Message popup. I want to trigger below code without any side effects:

inAppMessaging.addClickListener { inAppMessage, action ->
      // invoke only code inside
          val data = inAppMessage.data // I am only interested in that data, don't want to trigger any browser intent
      }

Unfortunately, this listener is not being invoked when the defined action is empty. You must define the action with proper URL to be able to trigger this listener when popup is clicked.

Can we trigger such listener always when the popup is being clicked, even when the defined action for campaign is empty?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
JasonAHeroncommented, Jul 17, 2020

The above change should improve a few things

  1. Add a dismiss callback to be consistent with iOS
  2. Graceful handling for launching a URI intent with the user has no browser installed
  3. Now if a developer registers a click callback in the SDK then they will always get a chance to react to clicks even if that click does not have a URL.
2reactions
8kt8commented, Jul 8, 2020

Hi @JasonAHeron thanks for the quick response. Firebase InAppMessaging should not send Intent with custom scheme of data. Now I am trying to set button action like myAppId://sceenA, myAppId://sceenB, myAppId://sceenC. After trigger action by the user, I want only to change a screen inside the app. Now my app crashing: No Activity found to handle Intent { act=android.intent.action.VIEW dat=myAppId://sceenA (has extras) } FirebaseInAppMessagingClickListener should provide the option to disable the sending of intent or give a possibility to override this default behavior. In my case sending Intent is not needed. The same problem is when I want to open the Uri inside my app in WebView instead of the external browser.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found