braze-inc / braze-flutter-sdk

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

Whitelist/Blacklist screen for inAppMessage #55

Closed fahmisdk6 closed 10 months ago

fahmisdk6 commented 12 months ago

Is there any way to control which flutter screen is allowed to display in app message? I can't find any method in the flutter lib to do that.

hokstuff commented 12 months ago

Hi @fahmisdk6,

Can you describe your use case for this feature? The In-App Message feature by default does not contain logic that is dependent on the UI of the host application (e.g. which Flutter screen is currently being displayed).

From my understanding of the request, this is not something that has a specific API designed for, but you may be able to achieve this via customization and adhering to specific protocols on the native layers:

In these methods, you can add your custom logic to check which window is currently being displayed, and then Discard the in-app message if it doesn't fit the conditions.

Feel free to email your responses and any follow-up questions to support@braze.com, and add the link to this Github issue.

Thanks!

fahmisdk6 commented 11 months ago

HI @hokstuff ,

Thank you for you reply, i will try your solution/

jseminck commented 10 months ago

Hi, sorry to hijack this thread but I have a similar problem to solve. I want to trigger in-app messages manually as I don't want those messages to show on top of other messages that we may show coming from our own server.

For Android I found this function exists: BrazeInAppMessageManager.getInstance().addInAppMessage(inAppMessage) (docs: https://www.braze.com/docs/developer_guide/platform_integration_guides/android/in-app_messaging/in-app_message_delivery/?tab=kotlin#manually-triggering-in-app-message-display)

Does something similar exist for Flutter?

hokstuff commented 10 months ago

Hi @jseminck,

You can find documentation around how to disable automatic display of in-app messages on Flutter here. This would need to be done in the native layers, and then you can use the APIs present the native layers to present the in-app messages at a later time (Android and iOS implementations).

If you have further questions, please contact our Support team at support@braze.com so we could dive deeper into any specific integration issues you may have.


Since the original thread appears to have a possible solution and there has been inactivity from the original poster, I will close out this issue. As always, if you have additional questions, feel free to contact our Support team.

Thanks all!