334
Views
8
Comments
Redirect to default phone SMS App and pass data
Question

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:

2019-09-30 07-35-56
Aurelio Junior

Hi Charul,

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

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Alternatively, use the SMS Cordova Plugin.

UserImage.jpg
Charul Mathur

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 ?

2019-09-24 18-41-25
Jorge Martins
 
MVP

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>


UserImage.jpg
Charul Mathur

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. 

2019-09-30 07-35-56
Aurelio Junior

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.

2019-09-24 18-41-25
Jorge Martins
 
MVP

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).

UserImage.jpg
Charul Mathur

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 !! 


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.