Package org.linphone.core
Interface CoreListener
- All Known Implementing Classes:
CoreListenerStub
public interface CoreListener
That class holds all the callbacks which are called by
Once created, add your
Keep a reference on it as long as you need it. You can use
to remove it but that isn't mandatory.
The same applies to all listeners in our API.
Core
. Once created, add your
CoreListener
using Core.addListener(org.linphone.core.CoreListener)
.Keep a reference on it as long as you need it. You can use
Core.removeListener(org.linphone.core.CoreListener)
to remove it but that isn't mandatory.
The same applies to all listeners in our API.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onAccountAdded
(Core core, Account account) Account added callback prototype.void
onAccountRegistrationStateChanged
(Core core, Account account, RegistrationState state, String message) Callback notifying that aAccount
has its registration state changed.void
onAccountRemoved
(Core core, Account account) Account removed callback prototype.void
onAudioDeviceChanged
(Core core, AudioDevice audioDevice) Callback prototype telling that the audio device for at least one call has
changed.void
Callback prototype telling the audio devices list has been updated.void
onAuthenticationRequested
(Core core, AuthInfo authInfo, AuthMethod method) Callback for requesting authentication information to application or user.void
onBuddyInfoUpdated
(Core core, Friend linphoneFriend) Callback prototype when using the buddy plugin.void
onCallCreated
(Core core, Call call) Callback notifying that a newCall
(either incoming or outgoing) has
been created.void
onCallEncryptionChanged
(Core core, Call call, boolean mediaEncryptionEnabled, String authenticationToken) Call encryption changed callback.void
onCallGoclearAckSent
(Core core, Call call) GoClear ACK sent on call callback.void
onCallIdUpdated
(Core core, String previousCallId, String currentCallId) Callback to notify the callid of a call has been updated.void
onCallLogUpdated
(Core core, CallLog callLog) Callback to notify a new call-log entry has been added.void
onCallReceiveMasterKeyChanged
(Core core, Call call, String masterKey) Call receive master key changed callback.void
onCallSendMasterKeyChanged
(Core core, Call call, String masterKey) Call send master key changed callback.void
onCallStateChanged
(Core core, Call call, Call.State state, String message) Call state notification callback.void
onCallStatsUpdated
(Core core, Call call, CallStats callStats) Callback for receiving quality statistics for calls.void
onChatRoomEphemeralMessageDeleted
(Core core, ChatRoom chatRoom) Callback prototype telling that aChatRoom
ephemeral message has
expired.void
onChatRoomRead
(Core core, ChatRoom chatRoom) Chat room marked as read callback.void
onChatRoomSessionStateChanged
(Core core, ChatRoom chatRoom, Call.State state, String message) Chat room session state changed callback.void
onChatRoomStateChanged
(Core core, ChatRoom chatRoom, ChatRoom.State state) Callback prototype telling that aChatRoom
state has changed.void
onChatRoomSubjectChanged
(Core core, ChatRoom chatRoom) Callback prototype telling that aChatRoom
subject has changed.void
onConferenceInfoReceived
(Core core, ConferenceInfo conferenceInfo) Callback prototype for notifying the application about a received conference
info.void
onConferenceStateChanged
(Core core, Conference conference, Conference.State state) Callback prototype telling that aConference
state has changed.void
onConfiguringStatus
(Core core, ConfiguringState status, String message) Callback prototype for configuring status changes notification.void
onDefaultAccountChanged
(Core core, Account account) Default account changed callback prototype.void
onDtmfReceived
(Core core, Call call, int dtmf) Callback for being notified of DTMFs received.void
onEcCalibrationAudioInit
(Core core) Function prototype used by linphone_core_cbs_set_ec_calibration_audio_init.void
Function prototype used by linphone_core_cbs_set_ec_calibration_audio_uninit.void
onEcCalibrationResult
(Core core, EcCalibratorStatus status, int delayMs) Function prototype used by linphone_core_cbs_set_ec_calibration_result.void
onFirstCallStarted
(Core core) Callback prototype telling a call has started (incoming or outgoing) while
there was no other call.void
onFriendListCreated
(Core core, FriendList friendList) Callback prototype for reporting when a friend list has been added to the core
friend lists.void
onFriendListRemoved
(Core core, FriendList friendList) Callback prototype for reporting when a friend list has been removed from the
core friend lists.void
onGlobalStateChanged
(Core core, GlobalState state, String message) Global state notification callback.void
onImeeUserRegistration
(Core core, boolean status, String userId, String info) Callback prototype telling that an Instant Message Encryption Engine user
registered on the server with or without success.void
onInfoReceived
(Core core, Call call, InfoMessage message) Callback prototype for receiving info messages.void
onIsComposingReceived
(Core core, ChatRoom chatRoom) Is composing notification callback prototype.void
onLastCallEnded
(Core core) void
onLogCollectionUploadProgressIndication
(Core core, int offset, int total) Callback prototype for reporting log collection upload progress indication.void
onLogCollectionUploadStateChanged
(Core core, Core.LogCollectionUploadState state, String info) Callback prototype for reporting log collection upload state change.void
onMessageReceived
(Core core, ChatRoom chatRoom, ChatMessage message) Chat message callback prototype.void
onMessageReceivedUnableDecrypt
(Core core, ChatRoom chatRoom, ChatMessage message) Chat message not decrypted callback prototype.void
onMessageSent
(Core core, ChatRoom chatRoom, ChatMessage message) Called after theChatMessage.send()
was called.void
onMessagesReceived
(Core core, ChatRoom chatRoom, ChatMessage[] messages) Chat messages callback prototype.void
onNetworkReachable
(Core core, boolean reachable) Callback prototype for reporting network change either automatically detected
or notified byCore.setNetworkReachable(boolean)
.void
onNewAlertTriggered
(Core core, Alert alert) Callback for notifying about an alert (e.g on Qos)
void
onNewMessageReaction
(Core core, ChatRoom chatRoom, ChatMessage message, ChatMessageReaction reaction) Chat message new reaction callback prototype.void
onNewSubscriptionRequested
(Core core, Friend linphoneFriend, String url) Reports that a new subscription request has been received and wait for a
decision.void
onNotifyPresenceReceived
(Core core, Friend linphoneFriend) Report status change for a friend previously added to theCore
with
linphone_core_add_friend().void
onNotifyPresenceReceivedForUriOrTel
(Core core, Friend linphoneFriend, String uriOrTel, PresenceModel presenceModel) Reports presence model change for a specific URI or phone number of a friend.void
onNotifyReceived
(Core core, Event linphoneEvent, String notifiedEvent, Content body) Callback prototype for notifying the application about notification received
from the network.void
onNotifySent
(Core core, Event linphoneEvent, Content body) Callback prototype for notifying the application about notification that is
being sent.void
onPreviewDisplayErrorOccurred
(Core core, int errorCode) Callback to notify that there are errors from the video rendering.void
onPublishReceived
(Core core, Event linphoneEvent, String publishEvent, Content body) Callback prototype for notifying the application about publish received from
the network.void
onPublishStateChanged
(Core core, Event linphoneEvent, PublishState state) Callback prototype for notifying the application about changes of publish
states.void
onPushNotificationReceived
(Core core, String payload) Callback prototype for notifying the application a push notification was
received.void
onQrcodeFound
(Core core, String result) Callback prototype telling the result of decoded qrcode.void
onReactionRemoved
(Core core, ChatRoom chatRoom, ChatMessage message, Address address) Chat message removed reaction callback prototype.void
onReferReceived
(Core core, String referTo) Callback prototype for when a refer is received.void
onRegistrationStateChanged
(Core core, ProxyConfig proxyConfig, RegistrationState state, String message) Deprecated.void
onSubscribeReceived
(Core core, Event linphoneEvent, String subscribeEvent, Content body) Callback prototype for notifying the application about subscription received
from the network.void
onSubscriptionStateChanged
(Core core, Event linphoneEvent, SubscriptionState state) Callback prototype for notifying the application about changes of subscription
states, including arrival of new subscriptions.void
onTransferStateChanged
(Core core, Call transfered, Call.State callState) Callback for notifying progresses of transfers.void
onVersionUpdateCheckResultReceived
(Core core, VersionUpdateCheckResult result, String version, String url) Callback prototype for reporting the result of a version update check.
-
Method Details
-
onGlobalStateChanged
Global state notification callback.
- Parameters:
core
- theCore
.state
- theGlobalState
message
- informational message.
-
onRegistrationStateChanged
void onRegistrationStateChanged(@NonNull Core core, @NonNull ProxyConfig proxyConfig, RegistrationState state, @NonNull String message) Deprecated.06/04/2020 Use LinphoneCoreCbsAccountRegistrationStateChangedCb
insteadRegistration state notification callback prototype.
- Parameters:
core
- theCore
proxyConfig
- theProxyConfig
which state has changedstate
- the currentRegistrationState
message
- a non null informational message about the state
-
onConferenceInfoReceived
Callback prototype for notifying the application about a received conference
info.
- Parameters:
core
-Core
objectconferenceInfo
- theConferenceInfo
received
-
onPushNotificationReceived
Callback prototype for notifying the application a push notification was
received.
On iOS it only works with pushkit (VoIP) pushes.- Parameters:
core
-Core
objectpayload
- the body of the push notification, if any
-
onPreviewDisplayErrorOccurred
Callback to notify that there are errors from the video rendering.
Check LinphoneCallCbsVideoDisplayErrorOccurredCb for more details.- Parameters:
core
-Core
objecterrorCode
- The error code. It depends of the display filter (available
for OpenGL)
-
onCallStateChanged
void onCallStateChanged(@NonNull Core core, @NonNull Call call, Call.State state, @NonNull String message) Call state notification callback.
-
onNotifyPresenceReceived
-
onNotifyPresenceReceivedForUriOrTel
void onNotifyPresenceReceivedForUriOrTel(@NonNull Core core, @NonNull Friend linphoneFriend, @NonNull String uriOrTel, @NonNull PresenceModel presenceModel) Reports presence model change for a specific URI or phone number of a friend.
- Parameters:
core
-Core
objectlinphoneFriend
-Friend
objecturiOrTel
- The URI or phone number for which the presence model has
changedpresenceModel
- The newPresenceModel
-
onNewSubscriptionRequested
void onNewSubscriptionRequested(@NonNull Core core, @NonNull Friend linphoneFriend, @NonNull String url) Reports that a new subscription request has been received and wait for a
decision.
note: A subscription request is notified by this function only if theSubscribePolicy
for the givenFriend
has been set toSubscribePolicy.SPWait
.
SeeFriend.setIncSubscribePolicy(org.linphone.core.SubscribePolicy)
. -
onAuthenticationRequested
void onAuthenticationRequested(@NonNull Core core, @NonNull AuthInfo authInfo, @NonNull AuthMethod method) Callback for requesting authentication information to application or user.
- Parameters:
core
- theCore
authInfo
- aAuthInfo
pre-filled with username, realm and domain
values as much as possiblemethod
- the type of authentication requested asAuthMethod
enum
Application shall reply to this callback usingCore.addAuthInfo(org.linphone.core.AuthInfo)
.
-
onCallLogUpdated
Callback to notify a new call-log entry has been added.
This is done typically when a call terminates. -
onCallIdUpdated
void onCallIdUpdated(@NonNull Core core, @NonNull String previousCallId, @NonNull String currentCallId) Callback to notify the callid of a call has been updated.
This is done typically when a call retry.- Parameters:
core
- theCore
previousCallId
- the previous callid.currentCallId
- the new callid.
-
onMessageReceived
void onMessageReceived(@NonNull Core core, @NonNull ChatRoom chatRoom, @NonNull ChatMessage message) Chat message callback prototype.
- Parameters:
core
-Core
objectchatRoom
-ChatRoom
involved in this conversation. Can be created
by the framework in case the From-URI is not present in any chat room.message
-ChatMessage
incoming message
-
onNewMessageReaction
void onNewMessageReaction(@NonNull Core core, @NonNull ChatRoom chatRoom, @NonNull ChatMessage message, @NonNull ChatMessageReaction reaction) Chat message new reaction callback prototype.
- Parameters:
core
-Core
objectchatRoom
-ChatRoom
involved in this conversation. Can be created
by the framework in case the From-URI is not present in any chat room.message
- theChatMessage
to which the reaction applies toreaction
- theChatMessageReaction
that has been sent or received
-
onReactionRemoved
void onReactionRemoved(@NonNull Core core, @NonNull ChatRoom chatRoom, @NonNull ChatMessage message, @NonNull Address address) Chat message removed reaction callback prototype.
- Parameters:
core
-Core
objectchatRoom
-ChatRoom
involved in this conversation. Can be created
by the framework in case the From-URI is not present in any chat room.message
- theChatMessage
to which a reaction has been removed
fromaddress
- theAddress
of the person that removed it's reaction
-
onMessagesReceived
void onMessagesReceived(@NonNull Core core, @NonNull ChatRoom chatRoom, @NonNull ChatMessage[] messages) Chat messages callback prototype.
Only called when aggregation is enabled (aka [sip] chat_messages_aggregation ==
1 or usingCore.setChatMessagesAggregationEnabled(boolean)
), it replaces the
single message received callback. -
onMessageSent
Called after theChatMessage.send()
was called.
The message will be in state InProgress. In case of resend this callback won't
be called.- Parameters:
core
-Core
objectchatRoom
-ChatRoom
involved in this conversation. Can be be
created by the framework in case the From-URI is not present in any chat room.
message
-ChatMessage
outgoing message
-
onChatRoomSessionStateChanged
void onChatRoomSessionStateChanged(@NonNull Core core, @NonNull ChatRoom chatRoom, Call.State state, @NonNull String message) Chat room session state changed callback.
-
onChatRoomRead
Chat room marked as read callback.
-
onMessageReceivedUnableDecrypt
void onMessageReceivedUnableDecrypt(@NonNull Core core, @NonNull ChatRoom chatRoom, @NonNull ChatMessage message) Chat message not decrypted callback prototype.
- Parameters:
core
-Core
objectchatRoom
-ChatRoom
involved in this conversation. Can be be
created by the framework in case the from-URI is not present in any chat room.
message
-ChatMessage
incoming message
-
onIsComposingReceived
Is composing notification callback prototype.
-
onDtmfReceived
Callback for being notified of DTMFs received.
- Parameters:
core
- the LinphoneCorecall
- the LinphoneCall that received the dtmfdtmf
- the ascii code of the dtmf
-
onReferReceived
Callback prototype for when a refer is received.
- Parameters:
core
- theCore
referTo
- the address of the refer
-
onCallGoclearAckSent
GoClear ACK sent on call callback.
-
onCallEncryptionChanged
void onCallEncryptionChanged(@NonNull Core core, @NonNull Call call, boolean mediaEncryptionEnabled, @Nullable String authenticationToken) Call encryption changed callback.
-
onCallSendMasterKeyChanged
Call send master key changed callback.
-
onCallReceiveMasterKeyChanged
void onCallReceiveMasterKeyChanged(@NonNull Core core, @NonNull Call call, @Nullable String masterKey) Call receive master key changed callback.
-
onTransferStateChanged
Callback for notifying progresses of transfers.
- Parameters:
core
- the LinphoneCoretransfered
- the LinphoneCall that was transferedcallState
- the LinphoneCallState of the call to transfer target at the
far end.
-
onBuddyInfoUpdated
Callback prototype when using the buddy plugin.
-
onCallStatsUpdated
Callback for receiving quality statistics for calls.
-
onInfoReceived
Callback prototype for receiving info messages.
- Parameters:
core
- theCore
call
- the call whose info message belongs to.message
- the info message.
-
onSubscriptionStateChanged
void onSubscriptionStateChanged(@NonNull Core core, @NonNull Event linphoneEvent, SubscriptionState state) Callback prototype for notifying the application about changes of subscription
states, including arrival of new subscriptions.
- Parameters:
core
-Core
objectlinphoneEvent
- theEvent
state
- the newSubscriptionState
-
onNotifySent
Callback prototype for notifying the application about notification that is
being sent.
-
onNotifyReceived
void onNotifyReceived(@NonNull Core core, @NonNull Event linphoneEvent, @NonNull String notifiedEvent, @Nullable Content body) Callback prototype for notifying the application about notification received
from the network.
-
onSubscribeReceived
void onSubscribeReceived(@NonNull Core core, @NonNull Event linphoneEvent, @NonNull String subscribeEvent, @Nullable Content body) Callback prototype for notifying the application about subscription received
from the network.
-
onPublishStateChanged
Callback prototype for notifying the application about changes of publish
states.
- Parameters:
core
-Core
objectlinphoneEvent
- theEvent
state
- the newPublishState
-
onPublishReceived
void onPublishReceived(@NonNull Core core, @NonNull Event linphoneEvent, @NonNull String publishEvent, @Nullable Content body) Callback prototype for notifying the application about publish received from
the network.
-
onConfiguringStatus
Callback prototype for configuring status changes notification.
- Parameters:
core
- theCore
status
- the currentConfiguringState
message
- informational message.
-
onNetworkReachable
Callback prototype for reporting network change either automatically detected
or notified byCore.setNetworkReachable(boolean)
.
- Parameters:
core
- theCore
reachable
- true if network is reachable.
-
onLogCollectionUploadStateChanged
void onLogCollectionUploadStateChanged(@NonNull Core core, Core.LogCollectionUploadState state, @NonNull String info) Callback prototype for reporting log collection upload state change.
- Parameters:
core
-Core
objectstate
- The state of the log collection uploadinfo
- Additional information: error message in case of error state, URL
of uploaded file in case of success.
-
onLogCollectionUploadProgressIndication
Callback prototype for reporting log collection upload progress indication.
- Parameters:
core
-Core
objectoffset
- the number of bytes sent since the start of the uploadtotal
- the total number of bytes to upload
-
onFriendListCreated
Callback prototype for reporting when a friend list has been added to the core
friend lists.
- Parameters:
core
-Core
objectfriendList
-FriendList
object
-
onFriendListRemoved
Callback prototype for reporting when a friend list has been removed from the
core friend lists.
- Parameters:
core
-Core
objectfriendList
-FriendList
object
-
onCallCreated
-
onVersionUpdateCheckResultReceived
void onVersionUpdateCheckResultReceived(@NonNull Core core, @NonNull VersionUpdateCheckResult result, String version, @Nullable String url) Callback prototype for reporting the result of a version update check.
- Parameters:
core
-Core
objectresult
- The result of the version update checkurl
- The url where to download the new version if the result is
#LinphoneVersionUpdateCheckNewVersionAvailable
-
onConferenceStateChanged
void onConferenceStateChanged(@NonNull Core core, @NonNull Conference conference, Conference.State state) - Parameters:
core
-Core
objectconference
- TheConference
object for which the state has changed
state
- the currentChatRoom#State
-
onChatRoomStateChanged
-
onChatRoomSubjectChanged
-
onChatRoomEphemeralMessageDeleted
-
onImeeUserRegistration
void onImeeUserRegistration(@NonNull Core core, boolean status, @NonNull String userId, @NonNull String info) Callback prototype telling that an Instant Message Encryption Engine user
registered on the server with or without success.
- Parameters:
core
-Core
objectstatus
- the return status of the registration action.userId
- the userId published on the encryption engine serverinfo
- information about failure
-
onQrcodeFound
Callback prototype telling the result of decoded qrcode.
- Parameters:
core
-Core
objectresult
- The result of the decoded qrcode
-
onFirstCallStarted
Callback prototype telling a call has started (incoming or outgoing) while
there was no other call.
- Parameters:
core
-Core
object
-
onLastCallEnded
- Parameters:
core
-Core
object
-
onAudioDeviceChanged
Callback prototype telling that the audio device for at least one call has
changed.
- Parameters:
core
- LinphoneCore objectaudioDevice
- the newly used LinphoneAudioDevice object
-
onAudioDevicesListUpdated
Callback prototype telling the audio devices list has been updated.
Either a new device is available or a previously available device isn't
anymore. You can callCore.getAudioDevices()
to get the new list.- Parameters:
core
-Core
object
-
onEcCalibrationResult
Function prototype used by linphone_core_cbs_set_ec_calibration_result.
- Parameters:
core
- TheCore
.status
- TheEcCalibratorStatus
of the calibrator.delayMs
- The measured delay if available.
-
onEcCalibrationAudioInit
Function prototype used by linphone_core_cbs_set_ec_calibration_audio_init.
- Parameters:
core
- TheCore
.
-
onEcCalibrationAudioUninit
Function prototype used by linphone_core_cbs_set_ec_calibration_audio_uninit.
- Parameters:
core
- TheCore
.
-
onAccountRegistrationStateChanged
void onAccountRegistrationStateChanged(@NonNull Core core, @NonNull Account account, RegistrationState state, @NonNull String message) - Parameters:
core
- TheCore
object.account
- TheAccount
object which has its registration changed.state
- The newRegistrationState
for this account.message
- a non null informational message about the state
-
onDefaultAccountChanged
Default account changed callback prototype.
- Parameters:
core
-Core
objectaccount
-Account
object that has been set as the default account,
probably by callingCore.setDefaultAccount(org.linphone.core.Account)
, or null if the default
account was removed.
-
onAccountAdded
Account added callback prototype.
- Parameters:
core
-Core
objectaccount
-Account
object that has been added to the Core using
Core.addAccount(org.linphone.core.Account)
for example.
-
onAccountRemoved
Account removed callback prototype.
- Parameters:
core
-Core
objectaccount
-Account
object that has been added to the Core using
Core.removeAccount(org.linphone.core.Account)
for example.
-
onNewAlertTriggered
Callback for notifying about an alert (e.g on Qos)
-
instead