com.drismo.logic.sms
Class MessageHandler

java.lang.Object
  extended by com.drismo.logic.sms.MessageHandler

public class MessageHandler
extends java.lang.Object

This class is sending out the SMS-messages, and making sure the receivers doesn't get duplicate messages.


Field Summary
private static java.util.ArrayList<java.lang.String> notifiedNumbers
           
private static android.telephony.SmsManager SM
           
 
Constructor Summary
MessageHandler()
           
 
Method Summary
static void addNumber(java.lang.String nr)
          Add a new phone number to the notified list.
static void clearNumbers()
          Clear the notified numbers list.
static java.util.ArrayList<java.lang.String> getNumberArray()
          Get the list of already notified numbers.
static void sendSMS(java.lang.String recipient, java.lang.String message)
          Send an SMS-message to a specified receiver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SM

private static android.telephony.SmsManager SM

notifiedNumbers

private static java.util.ArrayList<java.lang.String> notifiedNumbers
Constructor Detail

MessageHandler

public MessageHandler()
Method Detail

addNumber

public static void addNumber(java.lang.String nr)
Add a new phone number to the notified list.

Parameters:
nr - Phone number to add to the notified list.

clearNumbers

public static void clearNumbers()
Clear the notified numbers list.


getNumberArray

public static java.util.ArrayList<java.lang.String> getNumberArray()
Get the list of already notified numbers.

Returns:
ArrayList with all the numbers.

sendSMS

public static void sendSMS(java.lang.String recipient,
                           java.lang.String message)
Send an SMS-message to a specified receiver.

Parameters:
recipient - The phone number to send the message to.
message - The message content.