com.skype.api
Class Conversation

java.lang.Object
  extended by com.skype.api.SkypeObject
      extended by com.skype.api.Conversation

public class Conversation
extends SkypeObject

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

ENABLE_BIRTHDAY_NOTIFICATION

public static final java.lang.String ENABLE_BIRTHDAY_NOTIFICATION
Setupkey SETUPKEY_ENABLE_BIRTHDAY_NOTIFICATION type:int default value:"1"
Enables/disables birthday notification messages.
- 0 - disable;
- 1 - enable;
This is account-specific setup key. It can only be used while an account is logged in.

See Also:
Constant Field Values

INBOX_UPDATE_TIMEOUT

public static final 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.
This is account-specific setup key. It can only be used while an account is logged in.

See Also:
Constant Field Values

RECENTLY_LIVE_TIMEOUT

public static final 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. Note that while the conversation remains in Conversation.LIVE_CONVERSATIONS filter, Skype.OnConversationListChange events will not fire if there is another call coming up within the same conversation. Seeting this key to 0 will cause conversations to exit the Conversation.LIVE_CONVERSATIONS list immediately, after live state drops.

This is account-specific setup key. It can only be used while an account is logged in.

See Also:
Constant Field Values

DISABLE_CHAT

public static final java.lang.String DISABLE_CHAT
Setupkey SETUPKEY_DISABLE_CHAT type:int Disables chat (for voice only clients).
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

DISABLE_CHAT_HISTORY

public static final java.lang.String DISABLE_CHAT_HISTORY
Setupkey SETUPKEY_DISABLE_CHAT_HISTORY type:int
Disables storage of chat history.
This is account-specific setup key. It can only be used while an account is logged in.

See Also:
Constant Field Values

CHAT_HISTORY_DAYS

public static final java.lang.String CHAT_HISTORY_DAYS
Setupkey SETUPKEY_CHAT_HISTORY_DAYS type:int
Time limit for keeping local chat message history.
This is account-specific setup key. It can only be used while an account is logged in.

See Also:
Constant Field Values

CHATDB_LIMIT_KB

public static final 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. Value is in KB. By default there is no limit. A minimum of 16 MB is recommended.

See Also:
Constant Field Values

DISABLE_CHAT_ACTIVITY_INDICATION

public static final 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.
- 0 - disable;
- 1 - enable;
This is account-specific setup key. It can only be used while an account is logged in.

See Also:
Constant Field Values

CALL_NOANSWER_TIMEOUT

public static final 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).
This is account-specific setup key. It can only be used while an account is logged in.

See Also:
Constant Field Values

CALL_SEND_TO_VM

public static final java.lang.String CALL_SEND_TO_VM
Setupkey SETUPKEY_CALL_SEND_TO_VM type:int
Autoforwarding of incoming calls to voicemail.
- 0 - off
- 1 - on
This is account-specific setup key. It can only be used while an account is logged in.

See Also:
Constant Field Values

CALL_APPLY_CF

public static final java.lang.String CALL_APPLY_CF
Setupkey SETUPKEY_CALL_APPLY_CF type:int
Enables/disables call forwarding.
- 0 - disable;
- 1 - enable;
This is account-specific setup key. It can only be used while an account is logged in.

See Also:
Constant Field Values

CALL_EMERGENCY_COUNTRY

public static final java.lang.String CALL_EMERGENCY_COUNTRY
Setupkey SETUPKEY_CALL_EMERGENCY_COUNTRY type:string
Country code for emergency calls
This is account-specific setup key. It can only be used while an account is logged in.

See Also:
Constant Field Values
Constructor Detail

Conversation

public Conversation(int oid,
                    Skype skype)
Method Detail

moduleID

public static final int moduleID()

GetPropertyAsEnum

public java.lang.Object GetPropertyAsEnum(int propid)
Specified by:
GetPropertyAsEnum in class SkypeObject

GetStrProperty

public java.lang.String GetStrProperty(Conversation.PROPERTY prop)

GetIntProperty

public int GetIntProperty(Conversation.PROPERTY prop)

GetBooleanProperty

public boolean GetBooleanProperty(Conversation.PROPERTY prop)

GetBinProperty

public byte[] GetBinProperty(Conversation.PROPERTY prop)

SetOption

public void SetOption(int propKey,
                      int value)
Setter method for Conversation option properties. Option properties are all Conversation properties starting with OPT_ prefix.

Parameters:
propKey - Conversation property key, for example: Conversation.OPT_JOINING_ENABLED
value - New value for the option property.

SetTopic

public void SetTopic(java.lang.String topic,
                     boolean isXML)
Setter for Conversation class META_TOPIC. This topic will be set for remote participants as well.

Parameters:
topic - New conversation topic.
isXML - Notifies remote UIs that the new topic contains xml tags.

SetGuidelines

public void SetGuidelines(java.lang.String guidelines,
                          boolean isXML)
Setter for Conversation META_GUIDELINES. This property will be visible to remote participants of the conversation.

Parameters:
guidelines - New value for the META_GUIDELINES property.
isXML - Set true to notify remote UIs that the new guideline contains XML tags.

SetPicture

public void SetPicture(byte[] jpeg)
Sets the conversation's avatar to the specified JPEG image, which is propagated to both local and remote participants. Before calling this method, you should use Skype.ValidateAvatar to verify that jpeg references a valid JPEG image.

Parameters:
jpeg - Conversation avatar binary.

SpawnConference

public 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. You do not need to add existing dialog participants to the string list. In fact, passing only the existing participants in the identities list will cause the method call to fail (return false), the same as if the list was empty. This method will also return false if the original conversation was not a dialog (contained more than two participants). Also note that this method always creates a new Conversation - even if a conversation with exactly the same participant list existed before.

Parameters:
identitiesToAdd - String list of additional participant identities. You do not need to add existing two participants from the original dialog to this list.
Returns:
conference Returns the resulting conversation or 0 if the method call failed.

AddConsumers

public 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. If you have an existing dialog conversation, use SpawnConference instead.

Parameters:
identities - Contact identities to be added to the Conversation.

Assimilate

public Conversation Assimilate(Conversation otherConversation)
Merges two live conversations. For example, if the user already has a live conversation up - let's call it conversation A. Then a new incoming call occurs - another conversation obtains LOCAL_LIVESTATUS == Conversation.RINGING_FOR_ME, let's call it conversation B. The user wishes to pick up the new incoming call and add it to the existing one. For this you can first call B->JoinLiveSession and then merge two calls with A->Assimilate(B, A). The second argument will return the merged conversation. Note that there are actually three conversation objects involved: A (before merge), B and C (after the merge). Normally it would make sense to have the first conversation (A) as the second argument, so that it gets overwritten with the assimilation result.

Parameters:
otherConversation - The new conversation to be merged with the one already in live state.
Returns:
conversation Returns a 3rd live conversation, result of merging two existing ones.

JoinLiveSession

public void JoinLiveSession(java.lang.String accessToken)
starts, answers or joins a live session (first one to join becomes LIVE_HOST)

Parameters:
accessToken - if starting a live session, allows to set a custom access token

RingOthers

public void RingOthers(java.lang.String[] identities,
                       boolean videoCall,
                       java.lang.String origin)
This is an alternative to calling Ring method for each Participant individually. This also works with dialogs (with identities containing only one item).

Parameters:
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

MuteMyMicrophone

public void MuteMyMicrophone()
Sets VOICE_STATUS to LISTENING in the Participant instance associated with us, causing any input from our microphone to be ignored. This is a Conversation class method, rather than Participant class, because this only applies to local participant.


UnmuteMyMicrophone

public 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. This is a Conversation class method, rather than Participant class, because this only applies to local participant.


HoldMyLiveSession

public void HoldMyLiveSession()
Puts the conversation on hold - Conversation LOCAL_LIVESTATUS changes to ON_HOLD_LOCALLY and to ON_HOLD_REMOTELY for remote participants.


ResumeMyLiveSession

public void ResumeMyLiveSession()
Resumes call from local hold.


LeaveLiveSession

public void LeaveLiveSession(boolean postVoiceAutoresponse)
Hang up or refuse to answer an incoming call. Set postVoiceAutoresponse to true to enable a caller to leave a voicemail message.

Parameters:
postVoiceAutoresponse -

StartVoiceMessage

public void StartVoiceMessage()
Begin recording a voice mail for this conversation's remote participant. Applies to conversations of type DIALOG only.


TransferLiveSession

public void TransferLiveSession(java.lang.String[] identities,
                                java.lang.String transferTopic)
This method is for doing call transfers. NB! Call transfers only work in one-on-one conversations (dialogs). Before attempting call transfer, you should check availability of transfer recipients with Conversation class CanTransferLiveSession method. If the current conversation has a live session up, that session (call) will be transferred to targets specified in the identities list. Note that identities is a string list - all identities in that list will get incoming calls. The first one of them to pick up the call - wins, and rest of the transfer targets will stop ringing.

Let's take a closer look how this works in practice. We have three call participants involved in the process, and two separate conversations. Let there be three callers: Caller A (call originator), Caller B (transferor) and Caller C (recipient of transfer).

- Caller A - calls Caller B; Caller B picks up the call - live conversation C1 is now up with A and B in it.
- After awhile, Caller B initiates call transfers to Caller C (and optionally to Callers D, E, F.. ). LOCAL_LIVESTATUS of C1 will get set to TRANSFERRING for both A and B.
- Caller C picks up the call. Conversation C1 will go off live status. For Caller B, conversation C1 LOCAL_LIVESTATUS will change to RECENTLY_LIVE. Another live conversation - C2 gets spawned, with Caller A and Caller C in it. For caller C, participant object representing caller A will have TRANSFERRED_BY property set to identity of caller A. For Caller B (in now no longer live conversation C1), participant object representing caller A gets its TRANSFERRED_TO property set to identity of caller C.

Parameters:
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.

CanTransferLiveSession

public boolean CanTransferLiveSession(java.lang.String identity)
Checks if the identity is available for receiving a transferred live session. If you are going to attempt to go for multiple transfer targets, you should use this check for all the target identities.

Parameters:
identity - Target identity.
Returns:
result Returns true if call transfer to given target is possible.

SendDTMF

public void SendDTMF(Participant.DTMF dtmf,
                     int lengthInMS)
Sends DTMF tone to a live conversation.

Parameters:
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.

StopSendDTMF

public void StopSendDTMF()
Stops the current DTMF tone being played into conversation. For example, use this method to cancel DTMF signals started with Conversation.SendDTMF before the duration given in lengthInMS runs out.


SetMyTextStatusTo

public void SetMyTextStatusTo(Participant.TEXT_STATUS status)
Sets local user typing indicator in the Conversation. Remote Participants can display these in their UI.

Parameters:
status - Typing indicator status value - Participant.TEXT_STATUS

PostText

public 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). The isXML argument can be used if the client UI has already taken care of converting message text to xml (for example, your UI might enable users to use bold tags in text messages.)

Parameters:
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.
Returns:
message Returns the Message object created as a result of this method (if successful).

PostContacts

public void PostContacts(Contact[] contacts)
Takes a list of Contacts as an argument and posts the list into the Conversation. The purpose of this feature is to enable sharing contacts between users, without resorting to contact search. Instead, if user A has contacts B and C, he can post contact C into chat with contact B. At this point, Contact B can add contact C to his contact list. From remote side, the posted contacts will appear as messages with type Message.POSTED_CONTACTS appearing in the conversation. The UI should allow adding these contacts from messages with this type into the contact list.

The list of posted contacts can be retrieved with the Message.GetContacts method.

Additionally, the UI then can parse the posted Contact data out of the Message.P_BODY_XML property. The list of contacts is wrapped between tags. Each contact item in the xml has following format:
- t - contact type. "s" - skype contact; "p" - phone number;
- s - skypename, present only in skypename contacts (t="s")
- p - phone number, present only in phone number contacts (t="p")
- f - contact's full name, if available
- d - contact's display name, if available

Note that only the type (t) field is mandatory. Depending on type, either skypename (s) or phone number (p) fields are always present. Full name and display name fields are optional.

Example BODY_XML with skypname contact:
@code



Example BODY_XML with PSTN contact:
@code



Example BODY_XML with multiple contacts:
@code


Parameters:
contacts - List of Contact objects, to be posted in the conversation.

PostFiles

public 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. From the remote side, incoming file transfers will appear as a conversation message with type POSTED_FILES. Once such a message is detected, the list of file transfer objects can be retrieved with Message.GetTransfers. At that point, remote participants will need to accept or decline those transfers.

Parameters:
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.
Returns:
PostFilesResult

PostVoiceMessage

public void PostVoiceMessage(Voicemail voicemail,
                             java.lang.String body)
Stop recording a voice mail for this conversation's remote participant and send it. Applies to conversations of type DIALOG only.
Stops the active voicemail recording and sends it (dialog only)

Parameters:
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.

PostSMS

public void PostSMS(Sms sms,
                    java.lang.String body)
Takes an SMS instance created by Skype.CreateOutgoingSms and posts it in the conversation. Note that you will need to set both Sms body text (Sms.SetBody) and recipient list (Sms.SetTargets) before you can post the object.

Parameters:
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

GetJoinBlob

public java.lang.String GetJoinBlob()
Retrieves a binary join blob for joining public conversations, which are always of type CONFERENCE. If called for a dialog, the blob argument will contain the empty string. The best way to create a Public Chat is to first create a fresh conversation with Skype class CreateConference, then minimally apply the public chat options OPT_JOINING_ENABLED and OPT_ENTRY_LEVEL_RANK - options, like this (C++):
@code
C->SetOption(Conversation.OPT_JOINING_ENABLED, true);


When that is done, you can call GetJoinBlob to retrieve the blob string. Use the blob string to generate and post an HTML link whose href attribute looks like this: href="skype:?chat&blob=_BLOB_GOES_HERE" A person running Skype desktop client can click this link to join the conversation and have that conversation opened in his UI. Note that the conversation host (creator) needs to be online for new joiners-via-link to start participating in the Public Chat.

Returns:
blob Returns the public conversation join blob.

Join

public void Join()
Tries to join a public conversation (aka public chat). This method is only useful if you have used Skype.GetConversationByBlob method with alsoJoin argument set to false.


EnterPassword

public void EnterPassword(java.lang.String password)
Submits password for joining password-protected conversation.

Parameters:
password - Password string.

SetPassword

public void SetPassword(java.lang.String password,
                        java.lang.String hint)
Sets password protection/new password for the conversation.

Parameters:
password - New password.
hint - Password hint.

RetireFrom

public void RetireFrom()
Leaves the conference. Not applicable to dialogs.


Delete

public void Delete()
Deletes this conversation, which must be of type CONFERENCE - dialogs between local user and any of his contacts are always persistant. Note that this also removes corresponding Message and Participant objects.


RenameTo

public void RenameTo(java.lang.String name)
Changes the META_NAME property of the conversation. Note that unlike topic and guidelines, this rename is just local - remote participants can have their own private names for conversations.

Parameters:
name - New name for the conversation. Passing an empty string in this argument causes the META_NAME to unset.

SetBookmark

public void SetBookmark(boolean bookmark)
Setter for Conversation class IS_BOOKMARKED.

Parameters:
bookmark - Set true to set the bookmark, false to remove the bookmark.

SetAlertString

public void SetAlertString(java.lang.String alertString)
Setter for Conversation class ALERT_STRING property. The main use of this property is checking bodies of incoming messages in the conversation for the alert string and producing notifications in UI for the user, when appropriate.

Parameters:
alertString - Substring to check in BODY_XML property of incoming messages.

RemoveFromInbox

public void RemoveFromInbox()
Removes conversation from Inbox.


AddToInbox

public void AddToInbox(int timestamp)
Sets Conversation inbox_timestamp property. If the timestamp argument is left empty or is greater than conversation consumption horizon, then the conversation will be restored to the inbox.

Parameters:
timestamp - If left empty or set to 0, the inbox_timestamp property is set to current time.

SetConsumedHorizon

public void SetConsumedHorizon(int timestamp,
                               boolean also_unconsume)
This method can be used to set the consumption (read) status of messages in the conversation. It sets Message.CONSUMPTION_STATUS to Message.CONSUMED for all messages in the conversation, older than the given timestamp. If the second argument is set to true, it also modifies messages more recent than the timestamp, by marking them as unconsumed.

Parameters:
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.

MarkUnread

public void MarkUnread()
sets consumption horizon to last inbox message id timestamp


IsMemberOf

public boolean IsMemberOf(ContactGroup group)
Checks if the conversation is a member of the given ContactGroup

Parameters:
group - ContactGroup
Returns:
result True if this conversation is a member of the ContactGroup specified by the group argument contains the conversation

GetParticipants

public Participant[] GetParticipants(Conversation.PARTICIPANTFILTER filter)
Retrieves the list of this conversation's current participants, which you can optionally request to be filtered. If no Participants pass the filter, an empty list will be returned (the method itself still returns true).

Parameters:
filter - Conversation.PARTICIPANTFILTER - defaults to Conversation.ALL
Returns:
participants List of conversation Participant objects that passed the filter.

GetLastMessages

public Conversation.GetLastMessagesResult GetLastMessages(int requireTimestamp)
Returns recent messages. The messages are returned in two lists - new messages (unconsumed) and recent message history (context messages). The context message list contains messages that are already above the consumption horizon but are fairly recent, making it likely that displaying them in UI would be good default behaviour.

Parameters:
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
Returns:
GetLastMessagesResult

FindMessage

public 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. If no matching messages are found, this method will return false. The search proceeds backwards in time, starting from the timestamp argument. To continue searching, you can start with timestamp=MAX_UINT, retrieve the TIMESTAMP property of the matching message, decrement it by one, and submit it as timestamp for the next FindMessage call.

Parameters:
text - Substring to search for.
fromTimestampUp -
Returns:
message Returns matching message or 0 if there was no match. As the likelihood of this object being invalid is quite high, you should always check for method return value before you start calling methods of this object.


Copyright © 2010, 2011 Skype Technologies. All Rights Reserved.