SMS number delimiter

Within perspective its possible to initiate a SMS message if a user is using a cell connected device; using something along the lines of:

    os = self.custom.source
    tel = "1234567890"
    mes = self.getSibling("TextArea").props.text


    if os == "iPhone":
        txt = 'sms://'+ tel +'/&body=' + mes
    else:
        txt = 'sms://'+ tel +'/?body=' + mes
    
    system.perspective.navigate(url=txt)

So my question is, if I want to send to multiple recipients, what delimiter should I used between the phone numbers? the usual suspects (,;.) fail.

This Stack Overflow post suggests it's possible using a certain syntax on iOS, but the Apple docs for the scheme make no such mention.

It may be similar for Android.

In any case, this isn't an Ignition/Perspective feature you're leveraging.

1 Like

some googling found me this,

Android:

sms:+15558675309,+15558675301?body=Text%20Here%20end!

iOS, macOS:

sms://open?addresses=+15558675309,+15558675301/&body=Text%20Here%20end!
4 Likes

Thanks Kevin

I saw that Stack Overflow post but no joy.

True, but its fun to try.

Sure, just wasn't sure if you were aware and wanted to be clear that this isn't something we just didn't document or could implement as a feature request.

Victor

ha, that's what I was missing, strange that google let me down

	os = self.custom.source
	tel ="1234567890,0987654321"
	mes = self.getSibling("TextArea").props.text
		
	if os == "iPhone":
		
		txt = 'sms://open?addresses='+ tel +'/&body=' + mes
	else:
		txt = 'sms://'+ tel +'/?body=' + mes
	
	system.perspective.navigate(url=txt)

Now works perfectly

I love this forum

4 Likes

i have some experience searching for browser uri stuff, as i have created some myself for use in one of my projects :stuck_out_tongue:

The Android code path looks the same as you already had - were you just testing on iOS before?

Kevin

I started with iOS, I hadn't got as far as Android, but that just worked anyway. Lucky day.