Using mobileComposeTextMessage

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
DRJ-UK
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 73
Joined: Tue Aug 23, 2011 2:50 pm
Contact:

Using mobileComposeTextMessage

Post by DRJ-UK » Sat Nov 16, 2013 12:14 pm

Colleagues

We have been experimenting with this function and discovered there was a neat little trick that might be useful for others to be aware of. In most cases, a recipient's telephone number is not known when SMS is called from within the App. Therefore, on iOS 7 using

Code: Select all

mobileComposeTextMessage "","Message..."

opens the SMS pane but automatically includes "Buddy Name," as the first recipient (see snapshot). Not very friendly|
SMSrecipient.png
Screen shot from iPhone 5 running iOS 7
SMSrecipient.png (11.9 KiB) Viewed 2645 times
However, using

Code: Select all

mobileComposeTextMessage "?","Message..." 

ensures recipient list is empty with the text insertion point when SMS is called. This also has the advantage of forcing the text insertion point into the recipient field instead of after the body text on a device running iOS 6. You can then type a recipient name as usual. We have tested this with a few other non-alphanumeric characters with the same effect.

Please note this can only be tested on a device, not in the simulator. As yet this is not documented in the dictionary.

Dave
LiveCode: Versions 8.0, 8.1
Xcode: Version 7.3, 8.0
Mac OS X: 10.11.12 (macOS Sierra) on iMacs with 3.4 Intel Core i7 & 16GB Memory

Creating Apps for educational professionals, effective teaching and learning.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Using mobileComposeTextMessage

Post by jacque » Sat Nov 16, 2013 11:32 pm

Interesting find. Could you add a user note to the dictionary? That way everyone will see it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

DRJ-UK
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 73
Joined: Tue Aug 23, 2011 2:50 pm
Contact:

Re: Using mobileComposeTextMessage

Post by DRJ-UK » Mon Nov 18, 2013 8:58 pm

The issue has been posted as a bug report, which has been confirmed.

Will provide updates here in due course.

Dave
LiveCode: Versions 8.0, 8.1
Xcode: Version 7.3, 8.0
Mac OS X: 10.11.12 (macOS Sierra) on iMacs with 3.4 Intel Core i7 & 16GB Memory

Creating Apps for educational professionals, effective teaching and learning.

Post Reply