CometChatCallLogs
is a Component that shows the list of Call Logs available. By default, names are shown for all listed users, along with their avatars if available.
CometChatCallLogs
being a wrapper component, offers versatility in its integration. It can be seamlessly launched via button clicks or any user-triggered action, enhancing the overall user experience and facilitating smoother interactions within the application.
Since CometChatCallLogs
can be launched by adding the following code snippet to the XML layout file.
CometChatCallLogs
within the XML code or in your activity or fragment then you’ll need to extract them and set them on the User object using the appropriate method.
CometChatCallLogs
into your Activity and Fragment by adding the following code snippets into the respective classes.
OnBackPressListener
is triggered when you press the back button in the app bar. It has a predefined behavior; when clicked, it navigates to the previous activity. However, you can override this action using the following code snippet.
Property | Description | Code |
---|---|---|
Limit | Sets the limit for the call logs request | .setLimit(int limit) |
Call Type | Sets the call type for the call logs request | .setCallType(String callType) |
Call Status | Sets the call status for the call logs request | .setCallStatus(String callStatus) |
Has Recording | Sets the recording status for the call logs request | .setHasRecording(boolean hasRecording) |
Call Direction | Sets the call direction for the call logs request | .setCallDirection(String callDirection) |
UID | Sets the user ID for the call logs request | .setUid(String uid) |
GUID | Sets the group ID for the call logs request | .setGuid(String guid) |
Call Category | Sets the call category for the call logs request | .setCallCategory(String callCategory) |
Auth Token | Sets the auth token for the call logs request | .setAuthToken(String authToken) |
Component
. By using event you can extend existing functionality. Being global events, they can be applied in Multiple Locations and are capable of being Added or Removed.
The CometChatCallLogs
component does not have any exposed events.
Methods | Description | Code |
---|---|---|
setBackIconVisibility | Used to toggle visibility for back button in the app bar | .setBackIconVisibility(View.VISIBLE); |
setToolbarVisibility | Used to toggle visibility for back button in the app bar | .setToolbarVisibility(View.GONE); |
setLoadingStateVisibility | Used to hide loading state while fetching Users | .setLoadingStateVisibility(View.GONE); |
setErrorStateVisibility | Used to hide error state on fetching conversations | .setErrorStateVisibility(View.GONE); |
setEmptyStateVisibility | Used to hide empty state on fetching conversations | .setEmptyStateVisibility(View.GONE); |
setSeparatorVisibility | Used to control visibility of Separators in the list view | .setSeparatorVisibility(View.GONE); |
time(long timestamp)
→ Custom full timestamp format
today(long timestamp)
→ Called when a message is from today
yesterday(long timestamp)
→ Called for yesterday’s messages
lastWeek(long timestamp)
→ Messages from the past week
otherDays(long timestamp)
→ Older messages
minute(long timestamp)
/ hour(long timestamp)
→ Exact time unit
minutes(long diffInMinutesFromNow, long timestamp)
→ e.g., “5 minutes ago”
hours(long diffInHourFromNow, long timestamp)
→ e.g., “2 hours ago”
setSubtitleView
which will be loaded in call log item.