Hi,
I know I could use sharing component. But I would like to have a prefilled subject an TO: field.
My goal is simply:
take a photo;
and then automatically send it to gmail android client, to have subject and TO prefilled, and to have that photo as attachment.
I wouldn't want to use php, and I wouldn't want to enter any SMTP or other e-mail server parameters.
I would like the end user to have the email pre-filled and then have him/her send it from his client.
@Taifun thank you. This is the link I see in a lot of messages, and before I wrote here a little bit I looked at it, but it doesn't seem to me that there is among that list of titles, the one that allows me to reach my goals:
Have a button that makes me take a photo
that shares it with gmail
show me a pre-filled gmail message with TO, subject, and attached image
let me just click to send the email, using the gmail button
A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps
How to do a lot of basic things with App Inventor are described here: How do you...? .
You are expecting to get the afterActivity AFTER you start the Activity, but you try to build the email at the same time! Look at my blocks again. You need to get your process workflow in the correct order:
Take Photo
then
*Copy the photo taken from your ASD to shared storage (Downloads or Pictures for example)
then
Get Photo file path from Shared Storage (you could use Activity starter pick/get content here) and set to a label/variable
then
use the extension blocks to build the email, using the above label.text / variable value for the file path
The activity starter blocks in @TIMAI2 's example pick an image from shared storage... however your image is stored in ASD amd the activity starter can't pick from there. .
Also as far as I can see @TIMAI2 's extension is not able to send attachments from ASD... @TIMAI2 is this correct?
If you want to use @TIMAI2 's extension then you should copy your image to shared storage and attach it from there
The file in question for the attachment will need to be from Shared Storage otherwise GMail will not be able to find it (and as Taifun says, could not be picked from the ASD using the ActivityStarter in any case)
I have edited my post above top reflect this for others passing here
And then I'm kind of glad to see that it's not such a simple thing.
However, I need to find a way not to have the photo selected, but to send the one taken directly.
But don't waste any more of your time.