Package nl.minetopiasdb.api.phone
Class PhoneMessageManager
java.lang.Object
nl.minetopiasdb.api.phone.PhoneMessageManager
Class for managing phone messages.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteMessage
(long id) Delete message with provided ID.static PhoneMessageManager
Get an instance of PhoneMessageManagergetMessages
(int phoneNumber) Get all the messages that have been sent to this phonenumber NOTE: Please call this method async!void
sendMessage
(int sourceNumber, int targetNumber, String content) Send a message from sourceNumber to targetNumber
-
Constructor Details
-
PhoneMessageManager
public PhoneMessageManager()
-
-
Method Details
-
getInstance
Get an instance of PhoneMessageManager- Returns:
- instance of PhoneMessageManager
-
getMessages
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
Send a message from sourceNumber to targetNumber- Parameters:
sourceNumber
- Source numbertargetNumber
- Target numbercontent
- 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
-