Jump to content









Photo

How to send SMS with listener ?


  • Please log in to reply
2 replies to this topic

#1 Aquarium2016

Aquarium2016

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 11 March 2016 - 08:22 AM

Hi everybody ! 

 

I'm a student from France and i discovered carriots.com for my project. 

My project is the management of fish tank and i have to do an alert message if there is a problem.

For example : 

       - If the water level is to hight or low

       - If the temperature is'nt in the expectations

       -....

 

But i have a problem, i did'nt understand how to send SMS with Carriots. 


I dont know if I put this in my code :

 

import com.carriots.sdk.utils.Sms;

 
def sms = new Sms();
sms.to="0627XXXXXX";  
sms.message="Your Carriots Listener has received data and sends you a SMS";
 
sms.send();
 
 
Thanks for reading and sorry for my bad English ! :S 

 



#2 gster_home

gster_home

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 20 June 2016 - 02:25 PM

i have the samw issue. it's not working  



#3 amendoza

amendoza

    Master of Puppets

  • Members
  • PipPip
  • 10 posts

Posted 26 July 2016 - 08:39 AM

Have you tried with the phone number in international format?

Ex.

sms.to="0034678XXXXXX"; 

00 -> International prefix
34 -> Country code (34 is Spain)
678XXXXXX -> your phone number.

You can try it from the debug terminal ( Debug Menu - Console) so you don't have to fire the listener.

 






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users