Skip to main content
Inspiring
June 9, 2017
Answered

External links from an app

  • June 9, 2017
  • 1 reply
  • 2167 views

Hi,

couple of general questions please:

when I set up a contact form on a website I use an external php file to process the form.

Would I use the same method for an app? Link to a php file on my server?

Or is there another method I need to be aware of.

Similarly, I'd like to use a widget which is available to embed in a html page (it's a weather widget). Would that work in an app created with Animate?

Any advice appreciated.

This topic has been closed for replies.
Correct answer kglad

OK, I see.

But what I mean is, I wont know the email address of phone number that the info will be sent to.

The user of the app has to provide that.

So, to be clear, the user installs the app. They answer a bunch of questions, they end up with a sort of pie chart which is built in response to the answers they give and at the end of the exercise I need them to save a copy of what they've entered (including the pie chart)>

So, the user has the option to email or sms it to themselves or whatever email address or phone number they enter themselves. I'd also like them to be able to download a copy of it too perhaps as a png.

Hope that makes sense and thanks again.


yes, you can do that.  eg, if you've saved the email address in the variable emailS, you would use:

navigateToURL(new URLRequest("mailto:"+emailS));

1 reply

kglad
Community Expert
June 9, 2017

you could, or you could use navigateToURL() and utilize the user's default email client.  because all mobiles (if you're making a mobile app) have email clients you can be sure they have one.

the widget will fail unless you re-work it.  it probably would be easier to retrieve an rss weather report and create your own weather display in animate.

Inspiring
June 9, 2017

It is a mobile app so what url would you navigate to? Would the user have to enter their email address?

Also, since I'm doing a mobile app, would that be the way for me to send via sms?

And, what if I want to send an image as part of the message?

Someone gave me a link to pngencode (I think it was you actually) but I can't find any documentation to show how to use that.

Thanks.

Inspiring
July 3, 2017

you don't use navigateToURL if you're using php.

you as3 looks ok, but your php does not.

change your headers to:

$headers  = 'MIME-Version: 1.0' . "\r\n";

$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

$headers .= 'From:this should be your server email address'. "\r\n";

$headers .= 'Reply-to: '.$_POST["senderEmail"]. "\r\n";

and change

if(@mail...

to

if(mail...

then debug in your browser's developer console


A basic question that I need to clarify.

For an app, should I be using the same pho method I would use on a website. Or is there a better way to submit forms in an app ?