|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.skype.api.SkypeObject
com.skype.api.Conversation
public class Conversation
The Conversation class encapsulates all types of communication possible with Skype client. Instant messaging, calls, video calls, file transfers, SMS, screen sharing - all take place within the context of a Conversation. Contacts are represented in Conversation as Participant objects. This also applies to contacts of PSTN type. All events in a conversation are represented as Message objects.
| Nested Class Summary | |
|---|---|
static class |
Conversation.ALLOWED_ACTIVITY
values for opt_admin_only_activities property |
static interface |
Conversation.ConversationListener
|
class |
Conversation.GetLastMessagesResult
|
static class |
Conversation.LIST_TYPE
|
static class |
Conversation.LOCAL_LIVESTATUS
|
static class |
Conversation.MY_STATUS
|
static class |
Conversation.PARTICIPANTFILTER
|
class |
Conversation.PostFilesResult
|
static class |
Conversation.PROPERTY
Properties of the Conversation class |
static class |
Conversation.TYPE
|
| Field Summary | |
|---|---|
static java.lang.String |
CALL_APPLY_CF
Setupkey SETUPKEY_CALL_APPLY_CF type:int Enables/disables call forwarding. |
static java.lang.String |
CALL_EMERGENCY_COUNTRY
Setupkey SETUPKEY_CALL_EMERGENCY_COUNTRY type:string Country code for emergency calls This is account-specific setup key. |
static java.lang.String |
CALL_NOANSWER_TIMEOUT
Setupkey SETUPKEY_CALL_NOANSWER_TIMEOUT type:int default value:"15" Timeout in seconds after which the incoming live session will stop ringing (and if possible, proceed to voicemail or call forward). |
static java.lang.String |
CALL_SEND_TO_VM
Setupkey SETUPKEY_CALL_SEND_TO_VM type:int Autoforwarding of incoming calls to voicemail. |
static java.lang.String |
CHAT_HISTORY_DAYS
Setupkey SETUPKEY_CHAT_HISTORY_DAYS type:int Time limit for keeping local chat message history. |
static java.lang.String |
CHATDB_LIMIT_KB
Setupkey SETUPKEY_CHATDB_LIMIT_KB type:int default value:"0" Use this key to limit the size of the chat db. |
static java.lang.String |
DISABLE_CHAT
Setupkey SETUPKEY_DISABLE_CHAT type:int Disables chat (for voice only clients). |
static java.lang.String |
DISABLE_CHAT_ACTIVITY_INDICATION
Setupkey SETUPKEY_DISABLE_CHAT_ACTIVITY_INDICATION type:int Enables/disables transmitting typing indicator signals to othe participants of conversations. |
static java.lang.String |
DISABLE_CHAT_HISTORY
Setupkey SETUPKEY_DISABLE_CHAT_HISTORY type:int Disables storage of chat history. |
static java.lang.String |
ENABLE_BIRTHDAY_NOTIFICATION
Setupkey SETUPKEY_ENABLE_BIRTHDAY_NOTIFICATION type:int default value:"1" Enables/disables birthday notification messages. |
static java.lang.String |
INBOX_UPDATE_TIMEOUT
Setupkey SETUPKEY_INBOX_UPDATE_TIMEOUT type:int Timeout in seconds, how old the Conversation.P_INBOX_TIMESTAMP has to be for it to be re-sorted in the inbox. |
static java.lang.String |
RECENTLY_LIVE_TIMEOUT
Setupkey SETUPKEY_RECENTLY_LIVE_TIMEOUT type:int default value:"20" The number of seconds a formerly live conversation will remain the Conversation.LIVE_CONVERSATIONS filter. |
| Fields inherited from class com.skype.api.SkypeObject |
|---|
mObjectId, mPropCache, skype |
| Constructor Summary | |
|---|---|
Conversation(int oid,
Skype skype)
|
|
| Method Summary | |
|---|---|
void |
AddConsumers(java.lang.String[] identities)
Takes one or more Contact identities and creates corresponding Participant objects within the context of this Conversation, which must be of type CONFERENCE. |
void |
AddToInbox(int timestamp)
Sets Conversation inbox_timestamp property. |
Conversation |
Assimilate(Conversation otherConversation)
Merges two live conversations. |
boolean |
CanTransferLiveSession(java.lang.String identity)
Checks if the identity is available for receiving a transferred live session. |
void |
Delete()
Deletes this conversation, which must be of type CONFERENCE - dialogs between local user and any of his contacts are always persistant. |
void |
EnterPassword(java.lang.String password)
Submits password for joining password-protected conversation. |
Message |
FindMessage(java.lang.String text,
int fromTimestampUp)
Finds the most recent Message object in the conversation that contains the substring specified by the text argument. |
byte[] |
GetBinProperty(Conversation.PROPERTY prop)
|
boolean |
GetBooleanProperty(Conversation.PROPERTY prop)
|
int |
GetIntProperty(Conversation.PROPERTY prop)
|
java.lang.String |
GetJoinBlob()
Retrieves a binary join blob for joining public conversations, which are always of type CONFERENCE. |
Conversation.GetLastMessagesResult |
GetLastMessages(int requireTimestamp)
Returns recent messages. |
Participant[] |
GetParticipants(Conversation.PARTICIPANTFILTER filter)
Retrieves the list of this conversation's current participants, which you can optionally request to be filtered. |
java.lang.Object |
GetPropertyAsEnum(int propid)
|
java.lang.String |
GetStrProperty(Conversation.PROPERTY prop)
|
void |
HoldMyLiveSession()
Puts the conversation on hold - Conversation LOCAL_LIVESTATUS changes to ON_HOLD_LOCALLY and to ON_HOLD_REMOTELY for remote participants. |
boolean |
IsMemberOf(ContactGroup group)
Checks if the conversation is a member of the given ContactGroup |
void |
Join()
Tries to join a public conversation (aka public chat). |
void |
JoinLiveSession(java.lang.String accessToken)
starts, answers or joins a live session (first one to join becomes LIVE_HOST) |
void |
LeaveLiveSession(boolean postVoiceAutoresponse)
Hang up or refuse to answer an incoming call. |
void |
MarkUnread()
sets consumption horizon to last inbox message id timestamp |
static int |
moduleID()
|
void |
MuteMyMicrophone()
Sets VOICE_STATUS to LISTENING in the Participant instance associated with us, causing any input from our microphone to be ignored. |
void |
PostContacts(Contact[] contacts)
Takes a list of Contacts as an argument and posts the list into the Conversation. |
Conversation.PostFilesResult |
PostFiles(java.lang.String[] paths,
java.lang.String body)
Takes a list of fully-qualified filenames and initiates corresponding file transfers in the conversation. |
void |
PostSMS(Sms sms,
java.lang.String body)
Takes an SMS instance created by Skype.CreateOutgoingSms and posts it in the conversation. |
Message |
PostText(java.lang.String text,
boolean isXML)
Posts the specified text the conversation, and populates message with a reference to the corresponding Message object (if no error occurred during execution). |
void |
PostVoiceMessage(Voicemail voicemail,
java.lang.String body)
Stop recording a voice mail for this conversation's remote participant and send it. |
void |
RemoveFromInbox()
Removes conversation from Inbox. |
void |
RenameTo(java.lang.String name)
Changes the META_NAME property of the conversation. |
void |
ResumeMyLiveSession()
Resumes call from local hold. |
void |
RetireFrom()
Leaves the conference. |
void |
RingOthers(java.lang.String[] identities,
boolean videoCall,
java.lang.String origin)
This is an alternative to calling Ring method for each Participant individually. |
void |
SendDTMF(Participant.DTMF dtmf,
int lengthInMS)
Sends DTMF tone to a live conversation. |
void |
SetAlertString(java.lang.String alertString)
Setter for Conversation class ALERT_STRING property. |
void |
SetBookmark(boolean bookmark)
Setter for Conversation class IS_BOOKMARKED. |
void |
SetConsumedHorizon(int timestamp,
boolean also_unconsume)
This method can be used to set the consumption (read) status of messages in the conversation. |
void |
SetGuidelines(java.lang.String guidelines,
boolean isXML)
Setter for Conversation META_GUIDELINES. |
void |
SetMyTextStatusTo(Participant.TEXT_STATUS status)
Sets local user typing indicator in the Conversation. |
void |
SetOption(int propKey,
int value)
Setter method for Conversation option properties. |
void |
SetPassword(java.lang.String password,
java.lang.String hint)
Sets password protection/new password for the conversation. |
void |
SetPicture(byte[] jpeg)
Sets the conversation's avatar to the specified JPEG image, which is propagated to both local and remote participants. |
void |
SetTopic(java.lang.String topic,
boolean isXML)
Setter for Conversation class META_TOPIC. |
Conversation |
SpawnConference(java.lang.String[] identitiesToAdd)
When called from dialog conversation, this spawns a new conversation, with existing two dialog participants plus new contact identities given in the identitiesToAdd list. |
void |
StartVoiceMessage()
Begin recording a voice mail for this conversation's remote participant. |
void |
StopSendDTMF()
Stops the current DTMF tone being played into conversation. |
void |
TransferLiveSession(java.lang.String[] identities,
java.lang.String transferTopic)
This method is for doing call transfers. |
void |
UnmuteMyMicrophone()
Sets VOICE_STATUS to SPEAKING in the Participant instance associated with us, causing any input from our microphone to be sent to the call host. |
| Methods inherited from class com.skype.api.SkypeObject |
|---|
close, getOid |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ENABLE_BIRTHDAY_NOTIFICATION
public static final java.lang.String INBOX_UPDATE_TIMEOUT
public static final java.lang.String RECENTLY_LIVE_TIMEOUT
public static final java.lang.String DISABLE_CHAT
public static final java.lang.String DISABLE_CHAT_HISTORY
public static final java.lang.String CHAT_HISTORY_DAYS
public static final java.lang.String CHATDB_LIMIT_KB
public static final java.lang.String DISABLE_CHAT_ACTIVITY_INDICATION
public static final java.lang.String CALL_NOANSWER_TIMEOUT
public static final java.lang.String CALL_SEND_TO_VM
public static final java.lang.String CALL_APPLY_CF
public static final java.lang.String CALL_EMERGENCY_COUNTRY
| Constructor Detail |
|---|
public Conversation(int oid,
Skype skype)
| Method Detail |
|---|
public static final int moduleID()
public java.lang.Object GetPropertyAsEnum(int propid)
GetPropertyAsEnum in class SkypeObjectpublic java.lang.String GetStrProperty(Conversation.PROPERTY prop)
public int GetIntProperty(Conversation.PROPERTY prop)
public boolean GetBooleanProperty(Conversation.PROPERTY prop)
public byte[] GetBinProperty(Conversation.PROPERTY prop)
public void SetOption(int propKey,
int value)
propKey - Conversation property key, for example: Conversation.OPT_JOINING_ENABLED value - New value for the option property.
public void SetTopic(java.lang.String topic,
boolean isXML)
topic - New conversation topic. isXML - Notifies remote UIs that the new topic contains xml tags.
public void SetGuidelines(java.lang.String guidelines,
boolean isXML)
guidelines - New value for the META_GUIDELINES property. isXML - Set true to notify remote UIs that the new guideline contains XML tags. public void SetPicture(byte[] jpeg)
jpeg - Conversation avatar binary. public Conversation SpawnConference(java.lang.String[] identitiesToAdd)
identitiesToAdd - String list of additional participant identities. You do not need to add existing two participants from the original dialog to this list. public void AddConsumers(java.lang.String[] identities)
identities - Contact identities to be added to the Conversation. public Conversation Assimilate(Conversation otherConversation)
otherConversation - The new conversation to be merged with the one already in live state. public void JoinLiveSession(java.lang.String accessToken)
accessToken - if starting a live session, allows to set a custom access token
public void RingOthers(java.lang.String[] identities,
boolean videoCall,
java.lang.String origin)
identities - List of Participants to ring. Leaving the list empty will result in ringing all participants of at least speaker level. videoCall - If true, indicates that we want to do a video call (video still needs to be separately enabled) origin - When call is initiated from web link, this argument must contain the URI that was used public void MuteMyMicrophone()
public void UnmuteMyMicrophone()
public void HoldMyLiveSession()
public void ResumeMyLiveSession()
public void LeaveLiveSession(boolean postVoiceAutoresponse)
postVoiceAutoresponse - public void StartVoiceMessage()
public void TransferLiveSession(java.lang.String[] identities,
java.lang.String transferTopic)
identities - String list of transfer target identities. As soon as first one in this list picks up the call, others will stop ringing. transferTopic - Optional conversation topic. This value will get set as META_TOPIC property of the conversation at the transferee end. Note that this is the only case where META_TOPIC field is used in context of dialog conversations. Thus assumption that remote UI will display topic field in case of dialogs may not be 100% correct. public boolean CanTransferLiveSession(java.lang.String identity)
identity - Target identity.
public void SendDTMF(Participant.DTMF dtmf,
int lengthInMS)
dtmf - Outgoing dtmf tone, possible values come from Participant.DTMF enumerator. lengthInMS - Duration in milliseconds. Defaults to 260 ms. Note that the DTMF tone can be also cancelled with Conversation.StopSendDTMF method. public void StopSendDTMF()
public void SetMyTextStatusTo(Participant.TEXT_STATUS status)
status - Typing indicator status value - Participant.TEXT_STATUS
public Message PostText(java.lang.String text,
boolean isXML)
text - Text value of the outgoing message (gets set as BODY_XML property of the Message object). isXML - For cases where the text argument was already encoded as xml message. public void PostContacts(Contact[] contacts)
contacts - List of Contact objects, to be posted in the conversation.
public Conversation.PostFilesResult PostFiles(java.lang.String[] paths,
java.lang.String body)
paths - list of fully-qualified filenames to be transferred body - Optional BODY_XML property for POSTED_FILES type messages that show up in remote UI.
public void PostVoiceMessage(Voicemail voicemail,
java.lang.String body)
voicemail - This argument is deprecated as of SDK version 3.2. Instead of manually constructing Voicemail object, you can call Conversation.StartVoiceMessage method to start recording a voicemail in context of a dialog. PostVoiceMessage will stop recording this voicemail and post it in the dialog. If instead of sending Voicemail, the user decides to cancel it, you should use Conversation.LeaveLiveSession method (Voicemail.Cancel is deprecated). body - Optional text message that remote UI can display in conversation, to notify the user of a new voicemail.
public void PostSMS(Sms sms,
java.lang.String body)
sms - SMS object. body - This argument is currently ignored. The message text needs to be set with Sms.SetBody method, prior to passing the Sms object to this method public java.lang.String GetJoinBlob()
public void Join()
public void EnterPassword(java.lang.String password)
password - Password string.
public void SetPassword(java.lang.String password,
java.lang.String hint)
password - New password. hint - Password hint. public void RetireFrom()
public void Delete()
public void RenameTo(java.lang.String name)
name - New name for the conversation. Passing an empty string in this argument causes the META_NAME to unset. public void SetBookmark(boolean bookmark)
bookmark - Set true to set the bookmark, false to remove the bookmark. public void SetAlertString(java.lang.String alertString)
alertString - Substring to check in BODY_XML property of incoming messages. public void RemoveFromInbox()
public void AddToInbox(int timestamp)
timestamp - If left empty or set to 0, the inbox_timestamp property is set to current time.
public void SetConsumedHorizon(int timestamp,
boolean also_unconsume)
timestamp - Consumption cutoff timestamp. Setting this to current time will mark all messages in the conversation as consumed. also_unconsume - If set to true, this also marks messages newer than the cutoff timestamp as unconsumed. For example, setting timestamp to 0 and also_unconsumed to true, will unconsume all messages in the conversation. public void MarkUnread()
public boolean IsMemberOf(ContactGroup group)
group - ContactGroup public Participant[] GetParticipants(Conversation.PARTICIPANTFILTER filter)
filter - Conversation.PARTICIPANTFILTER - defaults to Conversation.ALL public Conversation.GetLastMessagesResult GetLastMessages(int requireTimestamp)
requireTimestamp - If set to a non-zero value, includes messages no earlier than this timestamp, if not, includes messages from the last 24 hours only
public Message FindMessage(java.lang.String text,
int fromTimestampUp)
text - Substring to search for. fromTimestampUp -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||