Sending a picture as an attachment

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jrarick
Posts: 9
Joined: Sat Apr 08, 2006 2:48 pm
Contact:

Sending a picture as an attachment

Post by jrarick » Sat Jun 22, 2013 1:06 pm

Thanks to all in advance.

I understand how to write an app that will send an email - or at least put all the parts together and then it launches the phones email client.

I understand how to use the iphonepickphoto to pick a picture.

What I DO NOT understand is how to use the data/information from that selection(picture) to include it as an attachment in an email.

I have read the ios Release notes 27 times. I am ready to find out that the answer is there - there must be something at a more base level that I do not understand.

Thanks again!

Jack Rarick
Braintree Athletics
Creating Video Editing Software for Coaches and Teachers

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Sending a picture as an attachment

Post by jmburnod » Sat Jun 22, 2013 1:24 pm

Hi jrarick,

This thread should be useful for you
http://forums.runrev.com/phpBB2/viewtop ... 49&t=15614
Kind regards
Jean-Marc
https://alternatic.ch

jrarick
Posts: 9
Joined: Sat Apr 08, 2006 2:48 pm
Contact:

Re: Sending a picture as an attachment

Post by jrarick » Sat Jun 22, 2013 2:51 pm

Thank you - BUT ...

In the code below - how would I find the videopath?? Sorry ... I am so close!

---
put myVideoPath into myData["file"]
put "video/mp4" into myData["type"]
put "File Name" into myData["name"]
mobileComposeMail "My subject", , , , "My body", myData
---

And truly - thanks again!

Jack
Braintree Athletics
Creating Video Editing Software for Coaches and Teachers

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Sending a picture as an attachment

Post by Klaus » Sat Jun 22, 2013 3:03 pm

Hi Jack,

did you add the video(s) in the standalone builder via "Add files"?
Then you will find it here:
...
put specialfolderpath("engine") & "/name_of_your_video.mp4" into tVideoPath
...
## Or if you have the video in a subfolder:
...
put specialfolderpath("engine") & "/name_of_subfolder/name_of_your_video.mp4" into tVideoPath
...
Lookup "specialfolderpath()" in the ddictionary!


Best

Klaus

jrarick
Posts: 9
Joined: Sat Apr 08, 2006 2:48 pm
Contact:

Re: Sending a picture as an attachment

Post by jrarick » Sat Jun 22, 2013 4:00 pm

I'm sorry!!!

These are not videos - these are pictures that the teacher just took.

Imagine this:

The teacher puts a diagram on a white board that they want ten of their students to see at home.

They take a picture of it with their iPhone camera.

They launch my app and then they want to choose that picture and send it as part of an email (attachment) to their ten students from inside of my app.

Aughh - I'm sorry - I am not a good explainer this morning!!

Jack
Braintree Athletics
Creating Video Editing Software for Coaches and Teachers

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Sending a picture as an attachment

Post by Simon » Sun Jun 23, 2013 5:33 am

Hi Jack,
So, you have iphonePickPhoto down, the rest is:
put it into tempPhoto

put tempPhoto into myData["file"]
put "image/jpg" into myData["type"]
put "File Name" into myData["name"]
mobileComposeMail "My subject", , , , "My body", myData

Does that work for you?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Post Reply