Class PhoneMessageManager

java.lang.Object
nl.minetopiasdb.api.phone.PhoneMessageManager

public class PhoneMessageManager extends Object
Class for managing phone messages.
  • Constructor Details

    • PhoneMessageManager

      public PhoneMessageManager()
  • Method Details

    • getInstance

      public static PhoneMessageManager getInstance()
      Get an instance of PhoneMessageManager
      Returns:
      instance of PhoneMessageManager
    • getMessages

      public List<PhoneMessage> getMessages(int phoneNumber)
      Get all the messages that have been sent to this phonenumber NOTE: Please call this method async!
      Parameters:
      phoneNumber - phone number
      Returns:
      List of PhoneMessage
    • sendMessage

      public void sendMessage(int sourceNumber, int targetNumber, String content)
      Send a message from sourceNumber to targetNumber
      Parameters:
      sourceNumber - Source number
      targetNumber - Target number
      content - Content of the message
    • deleteMessage

      public void deleteMessage(long id)
      Delete message with provided ID. NOTE: Please call this method async
      Parameters:
      id - id of phone message