Handling particular behaviour for SDK to open URL inside webview inside mobile app

Hi team,

We have 1 usecase to handle 1 particular action inside a mobile SDK. The use case is to open webview inside the application when user clicking CTA button in carousel instead of opening the link in external browser

How we achieve that?

1 Like

Hi @Rafif_Elrienanto

This can be achieved by following steps.

  1. On click of CTA button send an event with the URL as the data of the event
  2. Client App will receive the Bot Event
  3. Client App can perform the suitable action(like opening the URL inside the app)

We tried that way, but somehow the ym_card_action event giving a null data so we can’t capture the url in react native. Also how to prevent it to opening the external browser?

Hi @Sankalp_Gupta do you have any reference we can check ? if yes can you please share bot acces to us . thanks

@Rafif_Elrienanto , the only way to prevent opening it in the external browser is the one I have shared with you.

@Achmad_Raditya I can not share the bot access with you but I can help you with the example payload.

{
  "event": {
    "code": "sendIOSEvent",
    "data": {
      "code": "openUrl",
      "data": "{\"url\":\"https://www.shutterstock.com/image-vector/hi-sticker-social-media-content-260nw-1138004576.jpg\"}"
    }
  }

The application will receive an event and can handle it as they want. Please check attached video as well.
Simulator Screen Recording - iPhone 14 Pro - 2023-01-09 at 16.40.36

@Sankalp_Gupta thanks we have already done and use the sendiosevent using send event node. I guess from your video, we need another round of conclusion, and we need these details that you can share with us:

  1. Show us the screenshot of trigger event flow from the BOT that you shared in the video

Hi @Rafif_Elrienanto

If this comment helped resolve your query, please mark it as the solution.

1 Like