Interface CoreListener

All Known Implementing Classes:
CoreListenerStub

public interface CoreListener
That class holds all the callbacks which are called by 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 Details

    • onGlobalStateChanged

      void onGlobalStateChanged(@NonNull Core core, GlobalState state, @NonNull String message)
      Global state notification callback.

      Parameters:
      core - the Core.
      state - the GlobalState
      message - informational message.
    • onRegistrationStateChanged

      void onRegistrationStateChanged(@NonNull Core core, @NonNull ProxyConfig proxyConfig, RegistrationState state, @NonNull String message)
      Deprecated.
      06/04/2020 Use LinphoneCoreCbsAccountRegistrationStateChangedCb
      instead
      Registration state notification callback prototype.

      Parameters:
      core - the Core
      proxyConfig - the ProxyConfig which state has changed
      state - the current RegistrationState
      message - a non null informational message about the state
    • onConferenceInfoReceived

      void onConferenceInfoReceived(@NonNull Core core, @NonNull ConferenceInfo conferenceInfo)
      Callback prototype for notifying the application about a received conference
      info.

      Parameters:
      core - Core object
      conferenceInfo - the ConferenceInfo received
    • onPushNotificationReceived

      void onPushNotificationReceived(@NonNull Core core, @Nullable String payload)
      Callback prototype for notifying the application a push notification was
      received.

      On iOS it only works with pushkit (VoIP) pushes.
      Parameters:
      core - Core object
      payload - the body of the push notification, if any
    • onPreviewDisplayErrorOccurred

      void onPreviewDisplayErrorOccurred(@NonNull Core core, int errorCode)
      Callback to notify that there are errors from the video rendering.

      Check LinphoneCallCbsVideoDisplayErrorOccurredCb for more details.
      Parameters:
      core - Core object
      errorCode - 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.

      Parameters:
      core - the Core
      call - the Call object whose state is changed.
      state - the new Call#State of the call
      message - a non null informational message about the state.
    • onNotifyPresenceReceived

      void onNotifyPresenceReceived(@NonNull Core core, @NonNull Friend linphoneFriend)
      Report status change for a friend previously added to the Core with
      linphone_core_add_friend().

      Parameters:
      core - Core object
      linphoneFriend - Updated Friend
    • 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 object
      linphoneFriend - Friend object
      uriOrTel - The URI or phone number for which the presence model has
      changed
      presenceModel - The new PresenceModel
    • 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 the SubscribePolicy
      for the given Friend has been set to SubscribePolicy.SPWait.
      See Friend.setIncSubscribePolicy(org.linphone.core.SubscribePolicy).
      Parameters:
      core - Core object
      linphoneFriend - The Friend aimed by the subscription.
      url - URI of the subscriber
    • onAuthenticationRequested

      void onAuthenticationRequested(@NonNull Core core, @NonNull AuthInfo authInfo, @NonNull AuthMethod method)
      Callback for requesting authentication information to application or user.

      Parameters:
      core - the Core
      authInfo - a AuthInfo pre-filled with username, realm and domain
      values as much as possible
      method - the type of authentication requested as AuthMethod enum
      Application shall reply to this callback using Core.addAuthInfo(org.linphone.core.AuthInfo).
    • onCallLogUpdated

      void onCallLogUpdated(@NonNull Core core, @NonNull CallLog callLog)
      Callback to notify a new call-log entry has been added.

      This is done typically when a call terminates.
      Parameters:
      core - the Core
      callLog - the new CallLog entry added.
    • 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 - the Core
      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 object
      chatRoom - 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 object
      chatRoom - ChatRoom involved in this conversation. Can be created
      by the framework in case the From-URI is not present in any chat room.
      message - the ChatMessage to which the reaction applies to
      reaction - the ChatMessageReaction 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 object
      chatRoom - ChatRoom involved in this conversation. Can be created
      by the framework in case the From-URI is not present in any chat room.
      message - the ChatMessage to which a reaction has been removed
      from
      address - the Address 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 using Core.setChatMessagesAggregationEnabled(boolean)), it replaces the
      single message received callback.
      Parameters:
      core - Core object
      chatRoom - ChatRoom involved in this conversation. Can be created
      by the framework in case the From-URI is not present in any chat room.
      messages - The of incoming messages
    • onMessageSent

      void onMessageSent(@NonNull Core core, @NonNull ChatRoom chatRoom, @NonNull ChatMessage message)
      Called after the ChatMessage.send() was called.

      The message will be in state InProgress. In case of resend this callback won't
      be called.
      Parameters:
      core - Core object
      chatRoom - 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.

      Parameters:
      core - Core object
      chatRoom - ChatRoom that has been marked as read.
      state - the new Call#State of the call
      message - a non null informational message about the state.
    • onChatRoomRead

      void onChatRoomRead(@NonNull Core core, @NonNull ChatRoom chatRoom)
      Chat room marked as read callback.

      Parameters:
      core - Core object
      chatRoom - ChatRoom that has been marked as read.
    • onMessageReceivedUnableDecrypt

      void onMessageReceivedUnableDecrypt(@NonNull Core core, @NonNull ChatRoom chatRoom, @NonNull ChatMessage message)
      Chat message not decrypted callback prototype.

      Parameters:
      core - Core object
      chatRoom - 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

      void onIsComposingReceived(@NonNull Core core, @NonNull ChatRoom chatRoom)
      Is composing notification callback prototype.

      Parameters:
      core - Core object
      chatRoom - ChatRoom involved in the conversation.
    • onDtmfReceived

      void onDtmfReceived(@NonNull Core core, @NonNull Call call, int dtmf)
      Callback for being notified of DTMFs received.

      Parameters:
      core - the LinphoneCore
      call - the LinphoneCall that received the dtmf
      dtmf - the ascii code of the dtmf
    • onReferReceived

      void onReferReceived(@NonNull Core core, @NonNull String referTo)
      Callback prototype for when a refer is received.

      Parameters:
      core - the Core
      referTo - the address of the refer
    • onCallGoclearAckSent

      void onCallGoclearAckSent(@NonNull Core core, @NonNull Call call)
      GoClear ACK sent on call callback.

      Parameters:
      core - the Core
      call - the Call on which the GoClear ACK was sent.
    • onCallEncryptionChanged

      void onCallEncryptionChanged(@NonNull Core core, @NonNull Call call, boolean mediaEncryptionEnabled, @Nullable String authenticationToken)
      Call encryption changed callback.

      Parameters:
      core - the Core
      call - the Call on which encryption is changed.
      mediaEncryptionEnabled - whether encryption is activated.
      authenticationToken - an authentication token, currently set for ZRTP kind
      of encryption only.
    • onCallSendMasterKeyChanged

      void onCallSendMasterKeyChanged(@NonNull Core core, @NonNull Call call, @Nullable String masterKey)
      Call send master key changed callback.

      Parameters:
      core - the Core
      call - the Call on which the GoClear ACK was sent.
      masterKey - new master key.
    • onCallReceiveMasterKeyChanged

      void onCallReceiveMasterKeyChanged(@NonNull Core core, @NonNull Call call, @Nullable String masterKey)
      Call receive master key changed callback.

      Parameters:
      core - the Core
      call - the Call on which the GoClear ACK was sent.
      masterKey - new master key.
    • onTransferStateChanged

      void onTransferStateChanged(@NonNull Core core, @NonNull Call transfered, Call.State callState)
      Callback for notifying progresses of transfers.

      Parameters:
      core - the LinphoneCore
      transfered - the LinphoneCall that was transfered
      callState - the LinphoneCallState of the call to transfer target at the
      far end.
    • onBuddyInfoUpdated

      void onBuddyInfoUpdated(@NonNull Core core, @NonNull Friend linphoneFriend)
      Callback prototype when using the buddy plugin.

      Parameters:
      core - the Core
      linphoneFriend - the Friend that has been updated
    • onCallStatsUpdated

      void onCallStatsUpdated(@NonNull Core core, @NonNull Call call, @NonNull CallStats callStats)
      Callback for receiving quality statistics for calls.

      Parameters:
      core - the Core
      call - the Call
      callStats - the CallStats statistics.
    • onInfoReceived

      void onInfoReceived(@NonNull Core core, @NonNull Call call, @NonNull InfoMessage message)
      Callback prototype for receiving info messages.

      Parameters:
      core - the Core
      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 object
      linphoneEvent - the Event
      state - the new SubscriptionState
    • onNotifySent

      void onNotifySent(@NonNull Core core, @NonNull Event linphoneEvent, @Nullable Content body)
      Callback prototype for notifying the application about notification that is
      being sent.

      Parameters:
      core - Core object
      linphoneEvent - the Event received
      body - the Content of the event
    • 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.

      Parameters:
      core - Core object
      linphoneEvent - the Event received
      notifiedEvent - The event as string
      body - the Content of the event
    • 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.

      Parameters:
      core - Core object
      linphoneEvent - the Event received
      subscribeEvent - The event as string
      body - the Content of the event
    • onPublishStateChanged

      void onPublishStateChanged(@NonNull Core core, @NonNull Event linphoneEvent, PublishState state)
      Callback prototype for notifying the application about changes of publish
      states.

      Parameters:
      core - Core object
      linphoneEvent - the Event
      state - the new PublishState
    • 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.

      Parameters:
      core - Core object
      linphoneEvent - the Event received
      publishEvent - The event as string
      body - the Content of the event
    • onConfiguringStatus

      void onConfiguringStatus(@NonNull Core core, ConfiguringState status, @Nullable String message)
      Callback prototype for configuring status changes notification.

      Parameters:
      core - the Core
      status - the current ConfiguringState
      message - informational message.
    • onNetworkReachable

      void onNetworkReachable(@NonNull Core core, boolean reachable)
      Callback prototype for reporting network change either automatically detected
      or notified by Core.setNetworkReachable(boolean).

      Parameters:
      core - the Core
      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 object
      state - The state of the log collection upload
      info - Additional information: error message in case of error state, URL
      of uploaded file in case of success.
    • onLogCollectionUploadProgressIndication

      void onLogCollectionUploadProgressIndication(@NonNull Core core, int offset, int total)
      Callback prototype for reporting log collection upload progress indication.

      Parameters:
      core - Core object
      offset - the number of bytes sent since the start of the upload
      total - the total number of bytes to upload
    • onFriendListCreated

      void onFriendListCreated(@NonNull Core core, @NonNull FriendList friendList)
      Callback prototype for reporting when a friend list has been added to the core
      friend lists.

      Parameters:
      core - Core object
      friendList - FriendList object
    • onFriendListRemoved

      void onFriendListRemoved(@NonNull Core core, @NonNull FriendList friendList)
      Callback prototype for reporting when a friend list has been removed from the
      core friend lists.

      Parameters:
      core - Core object
      friendList - FriendList object
    • onCallCreated

      void onCallCreated(@NonNull Core core, @NonNull Call call)
      Callback notifying that a new Call (either incoming or outgoing) has
      been created.

      Parameters:
      core - Core object that has created the call
      call - The newly created Call object
    • 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 object
      result - The result of the version update check
      url - 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)
      Callback prototype telling that a Conference state has changed.

      Parameters:
      core - Core object
      conference - The Conference object for which the state has changed

      state - the current ChatRoom#State
    • onChatRoomStateChanged

      void onChatRoomStateChanged(@NonNull Core core, @NonNull ChatRoom chatRoom, ChatRoom.State state)
      Callback prototype telling that a ChatRoom state has changed.

      Parameters:
      core - Core object
      chatRoom - The ChatRoom object for which the state has changed
      state - the current ChatRoom#State
    • onChatRoomSubjectChanged

      void onChatRoomSubjectChanged(@NonNull Core core, @NonNull ChatRoom chatRoom)
      Callback prototype telling that a ChatRoom subject has changed.

      Parameters:
      core - Core object
      chatRoom - The ChatRoom object for which the subject has changed
    • onChatRoomEphemeralMessageDeleted

      void onChatRoomEphemeralMessageDeleted(@NonNull Core core, @NonNull ChatRoom chatRoom)
      Callback prototype telling that a ChatRoom ephemeral message has
      expired.

      Parameters:
      core - Core object
      chatRoom - The ChatRoom object for which a message has expired.
    • 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 object
      status - the return status of the registration action.
      userId - the userId published on the encryption engine server
      info - information about failure
    • onQrcodeFound

      void onQrcodeFound(@NonNull Core core, @Nullable String result)
      Callback prototype telling the result of decoded qrcode.

      Parameters:
      core - Core object
      result - The result of the decoded qrcode
    • onFirstCallStarted

      void onFirstCallStarted(@NonNull Core core)
      Callback prototype telling a call has started (incoming or outgoing) while
      there was no other call.

      Parameters:
      core - Core object
    • onLastCallEnded

      void onLastCallEnded(@NonNull Core core)
      Callback prototype telling the last call has ended (Core.getCallsNb()
      returns 0)

      Parameters:
      core - Core object
    • onAudioDeviceChanged

      void onAudioDeviceChanged(@NonNull Core core, @NonNull AudioDevice audioDevice)
      Callback prototype telling that the audio device for at least one call has
      changed.

      Parameters:
      core - LinphoneCore object
      audioDevice - the newly used LinphoneAudioDevice object
    • onAudioDevicesListUpdated

      void onAudioDevicesListUpdated(@NonNull Core core)
      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 call Core.getAudioDevices() to get the new list.
      Parameters:
      core - Core object
    • onEcCalibrationResult

      void onEcCalibrationResult(@NonNull Core core, EcCalibratorStatus status, int delayMs)
      Function prototype used by linphone_core_cbs_set_ec_calibration_result.

      Parameters:
      core - The Core.
      status - The EcCalibratorStatus of the calibrator.
      delayMs - The measured delay if available.
    • onEcCalibrationAudioInit

      void onEcCalibrationAudioInit(@NonNull Core core)
      Function prototype used by linphone_core_cbs_set_ec_calibration_audio_init.

      Parameters:
      core - The Core.
    • onEcCalibrationAudioUninit

      void onEcCalibrationAudioUninit(@NonNull Core core)
      Function prototype used by linphone_core_cbs_set_ec_calibration_audio_uninit.

      Parameters:
      core - The Core.
    • onAccountRegistrationStateChanged

      void onAccountRegistrationStateChanged(@NonNull Core core, @NonNull Account account, RegistrationState state, @NonNull String message)
      Callback notifying that a Account has its registration state changed.

      Parameters:
      core - The Core object.
      account - The Account object which has its registration changed.
      state - The new RegistrationState for this account.
      message - a non null informational message about the state
    • onDefaultAccountChanged

      void onDefaultAccountChanged(@NonNull Core core, @Nullable Account account)
      Default account changed callback prototype.

      Parameters:
      core - Core object
      account - Account object that has been set as the default account,
      probably by calling Core.setDefaultAccount(org.linphone.core.Account), or null if the default
      account was removed.
    • onAccountAdded

      void onAccountAdded(@NonNull Core core, @NonNull Account account)
      Account added callback prototype.

      Parameters:
      core - Core object
      account - Account object that has been added to the Core using
      Core.addAccount(org.linphone.core.Account) for example.
    • onAccountRemoved

      void onAccountRemoved(@NonNull Core core, @NonNull Account account)
      Account removed callback prototype.

      Parameters:
      core - Core object
      account - Account object that has been added to the Core using
      Core.removeAccount(org.linphone.core.Account) for example.
    • onNewAlertTriggered

      void onNewAlertTriggered(@NonNull Core core, @NonNull Alert alert)
      Callback for notifying about an alert (e.g on Qos)

      Parameters:
      core - Core object
      alert - Alert to notify