Redirect to default phone SMS App and pass data

Redirect to default phone SMS App and pass data

  

Hello,

How can I redirect to my default phone SMS app and pass the data of my Pop up block to the SMS screen ?

here is my screenshot:

Hi Charul,

Have you tried this Forge component? It allows you to use the device's native "Share" dialog to share content.

Alternatively, use the SMS Cordova Plugin.

I want to navigate the user to our default SMS app. Like we have an URL for navigating to call such as "tel:" + phone number, so is there any URL or string to navigate to the SMS app ?

Hi Charul,

According to this IETF RFC referenced from this W3C Recomendation, you can also use the following URI format on an anchor tag to open the native SMS app:

<a href="sms:PHONE-NUMBER?body=MESSAGE">LINK-TEXT</a>


Hi Charul,

I've just tested Jorge's suggestion on an iOS device and it works. However, iOS doesn't allow you to specify the message content, just the recipient's phone number (here's Apple's documentation). So, if your app is going to be used in iOS devices and you really need to pass data to be used in the message, this might not be a solution for you.

Jorge Martins wrote:

Hi Charul,

According to this IETF RFC referenced from this W3C Recomendation, you can also use the following URI format on an anchor tag to open the native SMS app:

<a href="sms:PHONE-NUMBER?body=MESSAGE">LINK-TEXT</a>


Hi Jorge,

Thanks for the answer. I have tested it in my Android device and its working correctly. 

Now the problem is I cannot send the data of my popup. The whole data is enclosed in a container as you can see in the screenshot - the blue colored border box data I want to send in the message body. 

Hi Charul,

The MESSAGE in the link will be the contents of the SMS that you want to send...

You just need to build that text manually from your data (string concatenation, using +, the Concat built-in function or the StringBuilder_Append action from the Text extension).

Jorge Martins wrote:

Hi Charul,

The MESSAGE in the link will be the contents of the SMS that you want to send...

You just need to build that text manually from your data (string concatenation, using +, the Concat built-in function or the StringBuilder_Append action from the Text extension).

Thanks a lot Jorge. It worked !!