mobileComposeMail offers too many options

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
simon.schvartzman
Posts: 641
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

mobileComposeMail offers too many options

Post by simon.schvartzman » Tue Feb 19, 2019 5:06 pm

Unless I'm not understanding correctly the documentation (read the dictionary first as Klaus always says) mobileComposeMail is giving me options that it shouldn't...

When i run the following script:

Code: Select all

on mouseUp
         export snapshot from group "Group 1"  to temp as JPEG
         put temp into tAttachment["data"]
         put "image/jpg" into tAttachment["type"]
         put "my picture" into tAttachment["name"]
         mobileComposeMail "Imagem Capturada", ,,,, tAttachment
end mouseUp
I would expect "just" the mail composer to pop up on the screen (as it happens on iPhone) or in the case there is more than one mail client installed on the device to give me the option to choose which one I want to use.

Instead I get this:
androidscreen1.jpg
In other words plenty of options that I didn't ask for (most of them make sense but "add to Google Maps" ?)

Please help me with the right option:

a - this is a LC bug
b - the documentation is wrong
c - I should give up programming (at least for Android anyway)

Environment:
LC 8.1 & Android 5.1 (LC 9.0.2 doesn't run on my Android 5.1 device)
Simon
________________________________________
To ";" or not to ";" that is the question

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7229
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: mobileComposeMail offers too many options

Post by jacque » Wed Feb 20, 2019 6:39 pm

This is a normal response on Android and isn't related to LC. When the app picker is called, the OS suggests the most likely or most used option at the top and then lists all other apps that support the file type involved. Since your email contains an image and Maps supports image uploads, that's why you see it there.

If the user has selected a default app for the file type then the picker won't be displayed at all, the default app will open instead. Android users can install any number of apps for any particular purpose. I have three mail apps (though I only use two) and three browsers. Because I use them for different purposes, I intentionally have not set a default so that I can choose which app to open each time.

Your Android users will know what to do.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

simon.schvartzman
Posts: 641
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Re: mobileComposeMail offers too many options

Post by simon.schvartzman » Wed Feb 20, 2019 6:54 pm

Thanks Jacque, makes sense. I guess it should be clarified on the Dictionary then.

Note 1: A few hours ago I reported this as a Bug https://quality.livecode.com/show_bug.cgi?id=21845 It should be changed to "Documentation change" or something. I will add this remark on the bug report.

Note 2: this functionality was exactly what I was looking for on another post https://forums.livecode.com/viewtopic.php?f=9&t=31897 and surprisingly nobody realised this was they way to go. I will update the post.

As always many thanks for your inputs.
Simon
________________________________________
To ";" or not to ";" that is the question

Post Reply

Return to “Android Deployment”