Class SMSTool


  • public class SMSTool
    extends java.lang.Object
    SMS APIs toolbox
    This class only provides static variables and methods
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.json.JSONObject getSettings​(Grant g)
      Get SMS service settings
      static java.lang.String sendSMS​(Grant g, java.lang.String to, java.lang.String msg)
      Send SMS
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PROVIDER_NONE

        public static final java.lang.String PROVIDER_NONE
        No provider
        See Also:
        Constant Field Values
      • PROVIDER_TWILIO

        public static final java.lang.String PROVIDER_TWILIO
        Twilio provider
        See Also:
        Constant Field Values
      • PROVIDER_SMSENVOI

        public static final java.lang.String PROVIDER_SMSENVOI
        SMS envoi provider
        See Also:
        Constant Field Values
    • Method Detail

      • getSettings

        public static org.json.JSONObject getSettings​(Grant g)
        Get SMS service settings
        Parameters:
        g - Grant
      • sendSMS

        public static java.lang.String sendSMS​(Grant g,
                                               java.lang.String to,
                                               java.lang.String msg)
                                        throws APIException
        Send SMS
        Parameters:
        g - Grant
        to - To phone number (e.g. +33144556677)
        msg - Message (160 characters max)
        Returns:
        SMS ID or null if there was an error
        Throws:
        APIException