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 TypeMethodDescriptionvoidonAccountAdded(Core core, Account account) Account added callback prototype.voidonAccountRegistrationStateChanged(Core core, Account account, RegistrationState state, String message) Callback notifying that aAccounthas its registration state changed.voidonAccountRemoved(Core core, Account account) Account removed callback prototype.voidonAudioDeviceChanged(Core core, AudioDevice audioDevice) Callback prototype telling that the audio device for at least one call has
changed.voidCallback prototype telling the audio devices list has been updated.voidonAuthenticationRequested(Core core, AuthInfo authInfo, AuthMethod method) Callback for requesting authentication information to application or user.voidonBuddyInfoUpdated(Core core, Friend linphoneFriend) Callback prototype when using the buddy plugin.voidonCallCreated(Core core, Call call) Callback notifying that a newCall(either incoming or outgoing) has
been created.voidonCallEncryptionChanged(Core core, Call call, boolean mediaEncryptionEnabled, String authenticationToken) Call encryption changed callback.voidonCallGoclearAckSent(Core core, Call call) GoClear ACK sent on call callback.voidonCallIdUpdated(Core core, String previousCallId, String currentCallId) Callback to notify the callid of a call has been updated.voidonCallLogUpdated(Core core, CallLog callLog) Callback to notify a new call-log entry has been added.voidonCallReceiveMasterKeyChanged(Core core, Call call, String masterKey) Call receive master key changed callback.voidonCallSendMasterKeyChanged(Core core, Call call, String masterKey) Call send master key changed callback.voidonCallStateChanged(Core core, Call call, Call.State state, String message) Call state notification callback.voidonCallStatsUpdated(Core core, Call call, CallStats callStats) Callback for receiving quality statistics for calls.voidonChatRoomEphemeralMessageDeleted(Core core, ChatRoom chatRoom) Callback prototype telling that aChatRoomephemeral message has
expired.voidonChatRoomRead(Core core, ChatRoom chatRoom) Chat room marked as read callback.voidonChatRoomSessionStateChanged(Core core, ChatRoom chatRoom, Call.State state, String message) Chat room session state changed callback.voidonChatRoomStateChanged(Core core, ChatRoom chatRoom, ChatRoom.State state) Callback prototype telling that aChatRoomstate has changed.voidonChatRoomSubjectChanged(Core core, ChatRoom chatRoom) Callback prototype telling that aChatRoomsubject has changed.voidonConferenceInfoReceived(Core core, ConferenceInfo conferenceInfo) Callback prototype for notifying the application about a received conference
info.voidonConferenceStateChanged(Core core, Conference conference, Conference.State state) Callback prototype telling that aConferencestate has changed.voidonConfiguringStatus(Core core, ConfiguringState status, String message) Callback prototype for configuring status changes notification.voidonDefaultAccountChanged(Core core, Account account) Default account changed callback prototype.voidonDtmfReceived(Core core, Call call, int dtmf) Callback for being notified of DTMFs received.voidonEcCalibrationAudioInit(Core core) Function prototype used by linphone_core_cbs_set_ec_calibration_audio_init.voidFunction prototype used by linphone_core_cbs_set_ec_calibration_audio_uninit.voidonEcCalibrationResult(Core core, EcCalibratorStatus status, int delayMs) Function prototype used by linphone_core_cbs_set_ec_calibration_result.voidonFirstCallStarted(Core core) Callback prototype telling a call has started (incoming or outgoing) while
there was no other call.voidonFriendListCreated(Core core, FriendList friendList) Callback prototype for reporting when a friend list has been added to the core
friend lists.voidonFriendListRemoved(Core core, FriendList friendList) Callback prototype for reporting when a friend list has been removed from the
core friend lists.voidonGlobalStateChanged(Core core, GlobalState state, String message) Global state notification callback.voidonImeeUserRegistration(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.voidonInfoReceived(Core core, Call call, InfoMessage message) Callback prototype for receiving info messages.voidonIsComposingReceived(Core core, ChatRoom chatRoom) Is composing notification callback prototype.voidonLastCallEnded(Core core) voidonLogCollectionUploadProgressIndication(Core core, int offset, int total) Callback prototype for reporting log collection upload progress indication.voidonLogCollectionUploadStateChanged(Core core, Core.LogCollectionUploadState state, String info) Callback prototype for reporting log collection upload state change.voidonMessageReceived(Core core, ChatRoom chatRoom, ChatMessage message) Chat message callback prototype.voidonMessageReceivedUnableDecrypt(Core core, ChatRoom chatRoom, ChatMessage message) Chat message not decrypted callback prototype.voidonMessageSent(Core core, ChatRoom chatRoom, ChatMessage message) Called after theChatMessage.send()was called.voidonMessagesReceived(Core core, ChatRoom chatRoom, ChatMessage[] messages) Chat messages callback prototype.voidonMessageWaitingIndicationChanged(Core core, Event lev, MessageWaitingIndication mwi) Callback notifying that a Message Waiting Indication state has changed.voidonNetworkReachable(Core core, boolean reachable) Callback prototype for reporting network change either automatically detected
or notified byCore.setNetworkReachable(boolean).voidonNewAlertTriggered(Core core, Alert alert) Callback for notifying about an alert (e.g on Qos)
voidonNewMessageReaction(Core core, ChatRoom chatRoom, ChatMessage message, ChatMessageReaction reaction) Chat message new reaction callback prototype.voidonNewSubscriptionRequested(Core core, Friend linphoneFriend, String url) Reports that a new subscription request has been received and wait for a
decision.voidonNotifyPresenceReceived(Core core, Friend linphoneFriend) Report status change for a friend previously added to theCorewith
linphone_core_add_friend().voidonNotifyPresenceReceivedForUriOrTel(Core core, Friend linphoneFriend, String uriOrTel, PresenceModel presenceModel) Reports presence model change for a specific URI or phone number of a friend.voidonNotifyReceived(Core core, Event linphoneEvent, String notifiedEvent, Content body) Callback prototype for notifying the application about notification received
from the network.voidonNotifySent(Core core, Event linphoneEvent, Content body) Callback prototype for notifying the application about notification that is
being sent.voidonPreviewDisplayErrorOccurred(Core core, int errorCode) Callback to notify that there are errors from the video rendering.voidonPublishReceived(Core core, Event linphoneEvent, String publishEvent, Content body) Callback prototype for notifying the application about publish received from
the network.voidonPublishStateChanged(Core core, Event linphoneEvent, PublishState state) Callback prototype for notifying the application about changes of publish
states.voidonPushNotificationReceived(Core core, String payload) Callback prototype for notifying the application a push notification was
received.voidonQrcodeFound(Core core, String result) Callback prototype telling the result of decoded qrcode.voidonReactionRemoved(Core core, ChatRoom chatRoom, ChatMessage message, Address address) Chat message removed reaction callback prototype.voidonReferReceived(Core core, Address referToAddr, Headers customHeaders, Content content) Callback prototype for when a refer is received.voidonRegistrationStateChanged(Core core, ProxyConfig proxyConfig, RegistrationState state, String message) Deprecated.voidonRemainingNumberOfFileTransferChanged(Core core, int downloadCount, int uploadCount) Called after a download is terminated or a new attachement is to be downloaded.voidonSnapshotTaken(Core core, String filePath) Callback notifying a snapshot has been taken.voidonSubscribeReceived(Core core, Event linphoneEvent, String subscribeEvent, Content body) Callback prototype for notifying the application about subscription received
from the network.voidonSubscriptionStateChanged(Core core, Event linphoneEvent, SubscriptionState state) Callback prototype for notifying the application about changes of subscription
states, including arrival of new subscriptions.voidonTransferStateChanged(Core core, Call transferred, Call.State callState) Callback for notifying progresses of transfers.voidonVersionUpdateCheckResultReceived(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- theGlobalStatemessage- 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- theCoreproxyConfig- theProxyConfigwhich state has changedstate- the currentRegistrationStatemessage- a non null informational message about the state
-
onConferenceInfoReceived
Callback prototype for notifying the application about a received conference
info.
- Parameters:
core-CoreobjectconferenceInfo- theConferenceInforeceived
-
onPushNotificationReceived
Callback prototype for notifying the application a push notification was
received.
On iOS it only works with pushkit (VoIP) pushes.- Parameters:
core-Coreobjectpayload- 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-CoreobjecterrorCode- 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-CoreobjectlinphoneFriend-FriendobjecturiOrTel- 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 givenFriendhas 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- theCoreauthInfo- aAuthInfopre-filled with username, realm and domain
values as much as possiblemethod- the type of authentication requested asAuthMethodenum
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- theCorepreviousCallId- the previous callid.currentCallId- the new callid.
-
onRemainingNumberOfFileTransferChanged
Called after a download is terminated or a new attachement is to be downloaded.
- Parameters:
core-CoreobjectdownloadCount- outstanding number of files to be downloaded including the
one that is currently downloadinguploadCount- outstanding number of files to be upload including the one
that is currently uploading
-
onMessageReceived
void onMessageReceived(@NonNull Core core, @NonNull ChatRoom chatRoom, @NonNull ChatMessage message) Chat message callback prototype.
- Parameters:
core-CoreobjectchatRoom-ChatRoominvolved in this conversation. Can be created
by the framework in case the From-URI is not present in any chat room.message-ChatMessageincoming message
-
onNewMessageReaction
void onNewMessageReaction(@NonNull Core core, @NonNull ChatRoom chatRoom, @NonNull ChatMessage message, @NonNull ChatMessageReaction reaction) Chat message new reaction callback prototype.
- Parameters:
core-CoreobjectchatRoom-ChatRoominvolved in this conversation. Can be created
by the framework in case the From-URI is not present in any chat room.message- theChatMessageto which the reaction applies toreaction- theChatMessageReactionthat 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-CoreobjectchatRoom-ChatRoominvolved in this conversation. Can be created
by the framework in case the From-URI is not present in any chat room.message- theChatMessageto which a reaction has been removed
fromaddress- theAddressof 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-CoreobjectchatRoom-ChatRoominvolved in this conversation. Can be be
created by the framework in case the From-URI is not present in any chat room.
message-ChatMessageoutgoing 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-CoreobjectchatRoom-ChatRoominvolved in this conversation. Can be be
created by the framework in case the from-URI is not present in any chat room.
message-ChatMessageincoming 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
void onReferReceived(@NonNull Core core, @NonNull Address referToAddr, @NonNull Headers customHeaders, @Nullable Content content) Callback prototype for when a refer is received.
- Parameters:
core- theCorereferToAddr- the address of the refercustomHeaders- the headers of the received REFER messagecontent- the content 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 LinphoneCoretransferred- the LinphoneCall that was transferredcallState- 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- theCorecall- 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-CoreobjectlinphoneEvent- theEventstate- 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-CoreobjectlinphoneEvent- theEventstate- 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- theCorestatus- the currentConfiguringStatemessage- informational message.
-
onNetworkReachable
Callback prototype for reporting network change either automatically detected
or notified byCore.setNetworkReachable(boolean).
- Parameters:
core- theCorereachable- 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-Coreobjectstate- 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-Coreobjectoffset- 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-CoreobjectfriendList-FriendListobject
-
onFriendListRemoved
Callback prototype for reporting when a friend list has been removed from the
core friend lists.
- Parameters:
core-CoreobjectfriendList-FriendListobject
-
onCallCreated
-
onVersionUpdateCheckResultReceived
void onVersionUpdateCheckResultReceived(@NonNull Core core, @NonNull VersionUpdateCheckResult result, @Nullable String version, @Nullable String url) Callback prototype for reporting the result of a version update check.
- Parameters:
core-Coreobjectresult- The result of the version update checkversion- The version to update tourl- 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-Coreobjectconference- TheConferenceobject 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-Coreobjectstatus- 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-Coreobjectresult- 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-Coreobject
-
onLastCallEnded
- Parameters:
core-Coreobject
-
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-Coreobject
-
onEcCalibrationResult
Function prototype used by linphone_core_cbs_set_ec_calibration_result.
- Parameters:
core- TheCore.status- TheEcCalibratorStatusof 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- TheCoreobject.account- TheAccountobject which has its registration changed.state- The newRegistrationStatefor this account.message- a non null informational message about the state
-
onDefaultAccountChanged
Default account changed callback prototype.
- Parameters:
core-Coreobjectaccount-Accountobject 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-Coreobjectaccount-Accountobject that has been added to the Core using
Core.addAccount(org.linphone.core.Account)for example.
-
onAccountRemoved
Account removed callback prototype.
- Parameters:
core-Coreobjectaccount-Accountobject that has been added to the Core using
Core.removeAccount(org.linphone.core.Account)for example.
-
onMessageWaitingIndicationChanged
void onMessageWaitingIndicationChanged(@NonNull Core core, @NonNull Event lev, @NonNull MessageWaitingIndication mwi) Callback notifying that a Message Waiting Indication state has changed.
- Parameters:
core- TheCoreobject.lev- TheEventobject notifying the MWI.mwi- TheMessageWaitingIndicationobject that is notified.
-
onSnapshotTaken
Callback notifying a snapshot has been taken.
- Parameters:
core- LinphoneCore object.filePath- the name of the saved file.
-
onNewAlertTriggered
Callback for notifying about an alert (e.g on Qos)
-
instead