public abstract class

SCEventListenerFacade

extends Object
implements ISCEventListener
java.lang.Object
   ↳ com.c2call.sdk.pub.facade.SCEventListenerFacade

Class Overview

Implementation of the internal event listener interface that will catch all events needed for VoIP calls.

You have to subclass this class and attach it to the SCCoreFacade singleton in order to recieve the events.

Summary

Public Constructors
SCEventListenerFacade()
Public Methods
void onCallStatusChanged(String callee, SCCallStatus status)
Called when the call status changed.
void onCamPreviewSizeChanged(Dimension dimension)
Called during a video call when the camera preview size changed.
void onCreditChanged(SCCredit credits)
Called when the user credit changed
void onError(ErrorEvent event)
Called when an error occured.
void onEvent(String from, String eventName, String message)
Called when a custom event was received.
synchronized final void onEvent(IC2CallEvent.Stub eventStub)
Called by the framework.
void onFinishedInitialization()
Called when the initialization process after a login request has finished successfully.
void onFirstVideoFrameReceived()
Called when the first video frame was received
void onGroupCallEvent(SCGroupCall groupCall)
Called if the status of a group call changed, i.e:
 - GroupCall started
 - GroupCall stopped
 - Active members changed
 
void onGroupCallStarted(String groupid, SCEventSource source)
Called when a new group call started
void onGroupCallTerminated(String groupid, SCEventSource source)
Called when a group call terminates
void onIncomingBoardEvent(SCBoardEventData message, SCEventSource source)
Called when a message/event arrives that is targeting the Board
void onIncomingCall(String from, String to, SCCallStatus status, boolean isVideo)
Called when an incoming call is waiting.
void onMessageReadReport(String mid, int status)
Called if the receiver of a text message sent a read report, which typically means that he has read the message.
void onNewRelations(Set<String> relations)
Called when new friend relations where found.
void onNotifyStatusChanged(SCOnlineStatus status)
Called when the online status changed.
void onOutgoingBoardEvent(SCBoardEventData message, SCEventSource source)
Called when a board message/event was sent
void onPresenceUpdate(Map<String, SCOnlineStatus> onlineStatusMap)
Called if the online status of one or more friends changed.
void onProfileUpdate(SCProfile profile)
Called when the user profile was updated
void onPushMessage(SCPushMessage message)
Called when a push message arrives.
void onUpdateBoard(List<SCBoardEventData> events)
Called if the board list was updated.
void onUpdateFriends(List<SCFriendData> friends)
Called if the friend list was updated.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.c2call.sdk.pub.core.ISCEventListener

Public Constructors

public SCEventListenerFacade ()

Public Methods

public void onCallStatusChanged (String callee, SCCallStatus status)

Called when the call status changed. E.g. from CallStatus.Ringing to CallStatus.Connected if an incoming call was taken.

Parameters
callee the callee id of this call
status the current status of this call

public void onCamPreviewSizeChanged (Dimension dimension)

Called during a video call when the camera preview size changed.

Parameters
dimension the new preview size

public void onCreditChanged (SCCredit credits)

Called when the user credit changed

Parameters
credits the new credit

public void onError (ErrorEvent event)

Called when an error occured.

Parameters
event an error object with further details.

public void onEvent (String from, String eventName, String message)

Called when a custom event was received.

Parameters
from The userid who sends this events
eventName the name of the custome event
message an optional message

public final synchronized void onEvent (IC2CallEvent.Stub eventStub)

Called by the framework.

public void onFinishedInitialization ()

Called when the initialization process after a login request has finished successfully.

public void onFirstVideoFrameReceived ()

Called when the first video frame was received

public void onGroupCallEvent (SCGroupCall groupCall)

Called if the status of a group call changed, i.e:

 - GroupCall started
 - GroupCall stopped
 - Active members changed
 

Parameters
groupCall the group call info object.

public void onGroupCallStarted (String groupid, SCEventSource source)

Called when a new group call started

Parameters
groupid the ID of th group that started
source the source of this event

public void onGroupCallTerminated (String groupid, SCEventSource source)

Called when a group call terminates

Parameters
groupid the ID of the group that terminated
source the source of this event

public void onIncomingBoardEvent (SCBoardEventData message, SCEventSource source)

Called when a message/event arrives that is targeting the Board

Parameters
message the board message that arrived
source the source of the message

public void onIncomingCall (String from, String to, SCCallStatus status, boolean isVideo)

Called when an incoming call is waiting. You may now call SCCoreFacade#takeCall() or hangup() to take or decline this call.

Parameters
from the phonenumber or userId of the interlocutor
to optional parameter that may specify the called DID number which was routed to this user
status the status of the incoming call; usually CallStatus.Ringing
isVideo true, if this is a video call

public void onMessageReadReport (String mid, int status)

Called if the receiver of a text message sent a read report, which typically means that he has read the message.

Parameters
mid the id of the message as given by getId()
status the new status of the message. Should be STATUS_READ in most cases.

public void onNewRelations (Set<String> relations)

Called when new friend relations where found. E.g. after calling addFriend(String)

Parameters
relations the user IDs of the new friends.

public void onNotifyStatusChanged (SCOnlineStatus status)

Called when the online status changed. If the connection to the sever is established successfully it will be OnlineStatus.Online and if it gets lost OnlineStatus.Offline

Parameters
status the current online status. Either OnlineStatus.Online or OnlineStatus.Offline

public void onOutgoingBoardEvent (SCBoardEventData message, SCEventSource source)

Called when a board message/event was sent

Parameters
message the board message that was sent
source the source of the message

public void onPresenceUpdate (Map<String, SCOnlineStatus> onlineStatusMap)

Called if the online status of one or more friends changed.

Parameters
onlineStatusMap the online status map contains the user Ids and and online status information of users whose status changed.

public void onProfileUpdate (SCProfile profile)

Called when the user profile was updated

Parameters
profile the new profile data

public void onPushMessage (SCPushMessage message)

Called when a push message arrives. Plesae note that the actual push message handling (notification building, message insertion to the board, etc.) is done by SCPushHandler. However, this method is a convinient way to get notified about activities on the Push channel or to do additinal custom with the incoming message.

Parameters
message the incoming message

public void onUpdateBoard (List<SCBoardEventData> events)

Called if the board list was updated.

Parameters
events the board events to update.

public void onUpdateFriends (List<SCFriendData> friends)

Called if the friend list was updated.

Parameters
friends the new friend list.