I have built a project that has a GSM relay that I can call or text and it will start my car. I want to build a simple app for it that with one click I can send an email or SMS to the GSM device and it will do its thing and start the vehicle. Can I send an email or SMS in the background with a pre-defined message. I know I can send it via the popup, but I want to avoid the popup and just the message in the background with no other interaction other then clicking the button… [import]uid: 2272 topic_id: 33402 reply_id: 333402[/import]
Most wireless providers offer an “email a test message” system which is basically your phonenumber@somedomain.name
Here is AT&T’s documentation for theirs:
http://www.att.com/esupport/article.jsp?sid=KB63037&cv=820#fbid=dYg2ihTMmNU
You will have to look up your carrier in question for your GSM relay. Once you know how to do that, it would be simple to setup a PHP script on a web server that would generate the SMS message for you by simply calling PHP’s mail() function:
http://email.about.com/od/emailprogrammingtips/qt/How_to_Send_Email_from_a_PHP_Script.htm
Once that PHP script is setup, it’s a matter of hitting it using Corona’s network.request() API call which can be easily attached to a button event handler.
One word of advice, you would want some type of password protection on the script so that some hackers don’t randomly start your car or try to exploit it somehow (flood the network with SMS messages etc.)
[import]uid: 199310 topic_id: 33402 reply_id: 132713[/import]
I never thought of invoking a PHP script. The GSM relay has some security within it, such as having a whitelist so it ignores any number that is not on that list. that is why i would prefer sending a sms from the phone, but i think i could make the php script work… [import]uid: 2272 topic_id: 33402 reply_id: 132718[/import]
Most wireless providers offer an “email a test message” system which is basically your phonenumber@somedomain.name
Here is AT&T’s documentation for theirs:
http://www.att.com/esupport/article.jsp?sid=KB63037&cv=820#fbid=dYg2ihTMmNU
You will have to look up your carrier in question for your GSM relay. Once you know how to do that, it would be simple to setup a PHP script on a web server that would generate the SMS message for you by simply calling PHP’s mail() function:
http://email.about.com/od/emailprogrammingtips/qt/How_to_Send_Email_from_a_PHP_Script.htm
Once that PHP script is setup, it’s a matter of hitting it using Corona’s network.request() API call which can be easily attached to a button event handler.
One word of advice, you would want some type of password protection on the script so that some hackers don’t randomly start your car or try to exploit it somehow (flood the network with SMS messages etc.)
[import]uid: 199310 topic_id: 33402 reply_id: 132713[/import]
I never thought of invoking a PHP script. The GSM relay has some security within it, such as having a whitelist so it ignores any number that is not on that list. that is why i would prefer sending a sms from the phone, but i think i could make the php script work… [import]uid: 2272 topic_id: 33402 reply_id: 132718[/import]