How do I - send a snapshot trough email from the c2 app.

Get help using Construct 2

Post » Wed Jun 04, 2014 7:16 pm

I'm making an app with c2 and I need to send the UserMedia.SnapshotURL content image that I capture using the camera trough email to a pre-defined email. Ideally I'd like to also be able to upload(choose) a picture already in the device to send ... this has prooven tricky as well.

I managed to take the snapshot using the camera, display it on screen on a sprite....

I also found a way described in one of the tutorials to download the picture as a png (or jpg) to the device which is also good...

I havn't been able to:

directly send the image as attachment to an email.

I'm using the user input plugin and the browser plugin.

Any help on this matter is greatly appreciated.
Freefall Bird
B
47
S
9
G
5
Posts: 280
Reputation: 5,796

Post » Thu Jun 05, 2014 5:27 am

Hello Ragevortex,

I think you have discovered all there is to (discover).

Sending an email would require that the app (your app) can open executable files on the host which is a no no.

Come to think of it, if there was an app that can sent automated email ... it would be a nightmare and then some. Those are usually referred to as "virus".
I know that you have a legit reason to do so but the browser will prevent that from happening.

Maybe I'm wrong,

V
B
14
S
4
Posts: 190
Reputation: 1,735

Post » Thu Jun 05, 2014 1:57 pm

Hi @vancouver tanks for the reply.
Well maybe if i hack and slash some php forms together and use that as form data to send but that's hardly what I want. If you can send an image with wassap/google/facebook/twitter etc... i see no reason we can't do it similareley ... albeit they do use their own solutions to do it ... I wouldn't wan to Twit the images and text as we will have little control of what comes out publicly if we do that... Still in the think tank for now.
@rexrainbow I'm interested in knowing if you have a tool that can be used in cases like this since you have a much more complete understanding of C2 than I do.
Freefall Bird
B
47
S
9
G
5
Posts: 280
Reputation: 5,796

Post » Thu Jun 05, 2014 2:48 pm

Currently, no. I had not made any plugin about email.
B
108
S
26
G
272
Posts: 4,472
Reputation: 152,279

Post » Fri Jul 11, 2014 1:57 pm

Well at least I have some progress so far...
Using @Pode 's plugin to extract base64 image information from one of my sprites which is working fine so far...
I'm able to trigger sending an email with php and AJAX wich is working... however I need to email that image I'm capturing ... I'm stuck only because my php script doesn't seem to be receiving the POST... or I may be over-processing it into nothingness...because I'm receiving a 0kb attachment... anyone else has been able to go a bit further away with something similar?
Freefall Bird
B
47
S
9
G
5
Posts: 280
Reputation: 5,796

Post » Thu Jul 17, 2014 4:52 pm

Update.
I was forced to make another capx (clean only what s needed) and export it as html5 and load it into a server with the needed php files
Using the iFrame plugin I call that in my mobile aplication. and Take the picture.
The php does its work and it sends the picture to the corresponding email.

it takes a while from taking the picture and processing it and the application seems frozen (its not) on the end it just works.
(when published with crosswalk)

However when accesing the android camera I'm having a slight issue since the colors values are inverted for some reason I have not yet been able to fathom.

If anyone has any idea on that particular detail I'd be really happy to hear it. @Ashley
Here's an example of the ressults:
You do not have the required permissions to view the files attached to this post.
Freefall Bird
B
47
S
9
G
5
Posts: 280
Reputation: 5,796


Return to How do I....?

Who is online

Users browsing this forum: TRMG and 34 guests