Post your questions and help other users.
Moderator: Martin
-
ltplenus
- Posts: 23
- Joined: 10 Jan 2015 21:39
Post
by ltplenus » 11 Jan 2015 03:40
Hello all,
I understand the concept of a variable 100% though im not really able to utilize it in my flows. I dont know where to define them and how to properly structure them ( im lacking a better explanation, sorry...)
As an example, im trying to send a picture taken with the camera as a SMS message however, im not able to populate the Body the way it should be. Any help is appreciated

-
Martin
- Posts: 4468
- Joined: 09 Nov 2012 14:23
Post
by Martin » 12 Jan 2015 19:53
Hi,
Automagic can only send regular text SMS with action Send SMS. It's not possible to send an MMS or any other kind of instant message (Whatsapp, Threema etc.) that contains an image.
However you could attach the picture to a mail and send the mail with Automagic.
Something like this should work:
-trigger ...
-action Take Picture: /storage/emulated/0/picture.jpg (No user interface)
-action Mail with Gmail and set Files to Attach to {picture_path}
The action Take Picture stores the image to the external storage of your device and provides a variable called picture_path that contains the path to the picture. The expression {picture_path} in the mail action will be replaced by the actual path of the picture when the flow is executed.
Regards,
Martin
-
ltplenus
- Posts: 23
- Joined: 10 Jan 2015 21:39
Post
by ltplenus » 12 Jan 2015 23:20
Thanks for your response Martin,
I was actually aware of the other possibility. I have actually built something similar to what you said ( Shortcut - Take Picture - Mail with Gmail ) and a ''Cerberus like'' Wrong Login Code with picture using the same principals...
But now, your comment brought something up to my mind..
What if i wanted to take picture after picture and have it sent without deleting the original/previous file ( picture.jpg, picture1.jpg, picture2.jpg and so on ) ??
Thanks again !
-
Martin
- Posts: 4468
- Joined: 09 Nov 2012 14:23
Post
by Martin » 13 Jan 2015 20:37
In this case I would recommend to use the date and time as part of the picture file name (for example picture_20140113_093020.jpg). A flow like this should work:
-trigger ...
-action Take Picture: /storage/emulated/0/picture_{triggertime,dateformat,yyyyMMdd_HHmmss}.jpg (No user interface)
-action Mail with Gmail and set Files to Attach to {picture_path}
You could also use a global variable that's incremented by one each time a picture is taken.
Regards,
Martin