braze-inc / braze-flutter-sdk

Public repo for the Braze Flutter SDK
Other
15 stars 29 forks source link

In App Messages Click Events Do Not Work #47

Closed rayliverified closed 12 months ago

rayliverified commented 1 year ago

Open URL, deeplink, or open in WebView in app do not work for me.

snap_screen_20230327193035

Clicking on the button in my app does nothing but close the in app message.

rayliverified commented 1 year ago

From what I've read in the documentation and code, this functionality is not currently supported by the Braze SDK. I'm opening this issue to confirm that is the case.

hokstuff commented 1 year ago

Hi @rayliverified,

We do support redirecting to custom URLs after clicking on an in-app message when using our Flutter SDK. Can you contact support@braze.com with more information on your integration, the campaign, the version you are using, verbose logging, etc and they will try to reproduce and help you out?

Thanks!

rayliverified commented 1 year ago

Thank you for the quick reply Daniel!

It's great to hear that opening URLs is supported by the Flutter SDK. I'll reach out to support to see what's happening.

Here, you can see nothing happens when the buttons are clicked. https://user-images.githubusercontent.com/19896174/228099090-2632863f-c182-4216-bd70-a0dac8173382.mp4

rayliverified commented 1 year ago

@hokstuff I have some initial information on what is causing the issue and I believe it points to the Braze SDK or there's some integration information I'm missing.

2 issues I'm seeing:

The issue is likely the deeplink intent isn't authored correctly when sent to the app.

Push notification is received when app is closed. This notification opens the BrazePushReceiver when clicked.

Received broadcast message. Message: Intent { act=com.appboy.action.APPBOY_PUSH_CLICKED cmp=com.treatmyocd.nocd.qa/com.braze.push.BrazePushReceiver (has extras) }

The BrazePushReceiver is responsible for resolving whether to open a URL, another app, URL in the app, or deeplink. It authors the intent to open the main app with.

{act=android.intent.action.VIEW dat=https://api-qa.treatmyocd.com/... pkg=com.treatmyocd.nocd.qa cmp=com.treatmyocd.nocd.qa/com.treatmyocd.nocd.MainActivity (has extras)} from uid 10458

The deeplink that is authored likely isn't passing the URL correctly.

rayliverified commented 1 year ago

This is the line that creates the intent. It is likely not creating the app start intent correctly.

https://github.com/braze-inc/braze-android-sdk/blob/6d8e477442eaf1410cafce4212b3174e462daf85/android-sdk-ui/src/main/java/com/braze/push/BrazeNotificationUtils.kt#L169

hokstuff commented 1 year ago

Hi @rayliverified,

Are you still experiencing this issue? I know a Support case was opened with our team and was checking in if it was resolved already, or if you have more information so they could continue with the investigation.

Thanks!

rayliverified commented 1 year ago

Yup, thanks for asking. There's a lot so that's on my backlog right now.

hokstuff commented 12 months ago

I'm closing out this issue due to inactivity and since we are already conversing via the Support channels about your specific setup. Feel free to add more information on those Support threads when you have more details - thanks!

favazHF commented 9 months ago

Hi @rayliverified @hokstuff Is there any news on how you fixed this issue?, it is happening with the latest version of Braze for flutter (6.0.0).

rayliverified commented 9 months ago

This was never fixed. It still doesn't work.

hokstuff commented 9 months ago

Hi @rayliverified,

Can you send additional information around your integration code to the Support team so we can look into your integration more in depth? Also, can you provide specific steps to repro, including which platform(s) you are experiencing issues? It would also help if you can add logging into the methods you'd expect to be called and send it alongside the other information. (Also note that on iOS, many use-cases for push notifications can't be tested on a simulator and needs to be tested on a device.)

The Flutter push integration currently is done in the native layers by following each platform's integration steps separately. This means that the code will live outside of the Dart files and in Swift/Kotlin/etc instead, and each platform has its own set up to be able to open deeplinks or URLs.

Thanks!

rayliverified commented 9 months ago

I was able to reproduce this with your example app. I can record a video demoing what I'm seeing.

hokstuff commented 9 months ago

Hi @rayliverified,

We have been unable to reproduce the issue in the Runner sample app for in-app messages with URLs on iOS and Android, since we are able to successfully open a linked URL inside a webview or by forwarding to an external browser.

For deeplinking, that is not currently integrated in the sample app so it is expected that deeplinks will simply open the app and not forward to any specific page. Please contact the existing Support thread with the information requested above or start a new thread with support@braze.com so we can look into your issue.

Thanks!

favazHF commented 9 months ago

Hi @hokstuff, I contacted braze support, commenting that I set up an IAM with an action button and also selecting the Deeplink to App option, when testing with my user the IAM is displayed correctly but when I press the action button it does nothing (just closes the IAM) which is not expected behaviour.

I tried to look for some example or related documentation to be able to capture natively this action but there is nothing.

From support they shared me an example but it was related to Push Notifications but I need IAM.

Any idea how to solve it? Thanks.

Screenshot 2023-08-09 at 12 18 07