-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from cometchat/dev
v1.0.2
- Loading branch information
Showing
22 changed files
with
885 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
app/src/main/java/com/cometchat/javasampleapp/fragments/calls/CallLogDetailsFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
package com.cometchat.javasampleapp.fragments.calls; | ||
|
||
import android.os.Bundle; | ||
|
||
import androidx.fragment.app.Fragment; | ||
|
||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import com.cometchat.calls.constants.CometChatCallsConstants; | ||
import com.cometchat.calls.model.CallLog; | ||
import com.cometchat.calls.model.CallUser; | ||
import com.cometchat.calls.model.Participant; | ||
import com.cometchat.calls.model.Recording; | ||
import com.cometchat.chatuikit.calls.calldetails.CometChatCallLogDetails; | ||
import com.cometchat.chatuikit.shared.cometchatuikit.CometChatUIKit; | ||
import com.cometchat.javasampleapp.R; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class CallLogDetailsFragment extends Fragment { | ||
private CometChatCallLogDetails cometChatCallLogDetails; | ||
|
||
@Override | ||
public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||
Bundle savedInstanceState) { | ||
// Inflate the layout for this fragment | ||
View view = inflater.inflate(R.layout.fragment_call_details, container, false); | ||
cometChatCallLogDetails = view.findViewById(R.id.call_logs_details); | ||
createCallLog(); | ||
return view; | ||
} | ||
|
||
public void createCallLog() { | ||
if (CometChatUIKit.getLoggedInUser() != null) { | ||
CallUser initiator = new CallUser(); | ||
initiator.setAvatar(CometChatUIKit.getLoggedInUser().getAvatar()); | ||
initiator.setUid(CometChatUIKit.getLoggedInUser().getUid()); | ||
initiator.setName(CometChatUIKit.getLoggedInUser().getName()); | ||
|
||
CallUser receiver = new CallUser(); | ||
receiver.setUid("UID233"); | ||
receiver.setName("Kevin"); | ||
receiver.setAvatar("https://data-us.cometchat.io/assets/images/avatars/spiderman.png"); | ||
|
||
|
||
List<Participant> participants = new ArrayList<>(); | ||
|
||
Participant participant = new Participant(); | ||
participant.setUid(CometChatUIKit.getLoggedInUser().getUid()); | ||
participant.setName(CometChatUIKit.getLoggedInUser().getName()); | ||
participant.setAvatar(CometChatUIKit.getLoggedInUser().getAvatar()); | ||
participant.setJoinedAt(1327349241); | ||
participant.setTotalDurationInMinutes(1327349241); | ||
|
||
Participant participant1 = new Participant(); | ||
participant1.setUid("UID233"); | ||
participant1.setName("Kevin"); | ||
participant1.setAvatar("https://data-us.cometchat.io/assets/images/avatars/spiderman.png"); | ||
participant1.setJoinedAt(1327349241); | ||
participant1.setHasJoined(true); | ||
participant1.setTotalDurationInMinutes(1327349241); | ||
|
||
participants.add(participant); | ||
participants.add(participant1); | ||
|
||
List<Recording> recordings = new ArrayList<>(); | ||
|
||
Recording recording = new Recording(); | ||
recording.setRecordingURL("https://recordings-us.cometchat.io/236497dcc2cd529b/2023-12-15/v1.us.236497dcc2cd529b.170264141733632a2e3171d8a5dcb1f82b743fbc2730422263_2023-12-15-11-57-16.mp4"); | ||
recording.setDuration(1327349241); | ||
recording.setRid("RID2023"); | ||
|
||
Recording recording1 = new Recording(); | ||
recording1.setRecordingURL("https://recordings-us.cometchat.io/236497dcc2cd529b/2023-12-15/v1.us.236497dcc2cd529b.170264141733632a2e3171d8a5dcb1f82b743fbc2730422263_2023-12-15-11-57-16.mp4"); | ||
recording1.setDuration(1327349241); | ||
recording1.setRid("RID2023-1"); | ||
recordings.add(recording); | ||
recordings.add(recording1); | ||
|
||
CallLog callLog = new CallLog(); | ||
callLog.setInitiatedAt(1327349241); | ||
callLog.setInitiator(initiator); | ||
callLog.setReceiver(receiver); | ||
callLog.setStatus(CometChatCallsConstants.CALL_STATUS_BUSY); | ||
callLog.setType(CometChatCallsConstants.CALL_TYPE_AUDIO); | ||
callLog.setParticipants(participants); | ||
callLog.setRecordings(recordings); | ||
callLog.setReceiverType(CometChatCallsConstants.RECEIVER_TYPE_USER); | ||
cometChatCallLogDetails.setCall(callLog); | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
app/src/main/java/com/cometchat/javasampleapp/fragments/calls/CallLogHistoryFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.cometchat.javasampleapp.fragments.calls; | ||
|
||
import android.os.Bundle; | ||
|
||
import androidx.fragment.app.Fragment; | ||
|
||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import com.cometchat.chatuikit.calls.callhistory.CometChatCallLogHistory; | ||
import com.cometchat.javasampleapp.R; | ||
|
||
|
||
public class CallLogHistoryFragment extends Fragment { | ||
private CometChatCallLogHistory cometChatCallLogHistory; | ||
|
||
@Override | ||
public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||
Bundle savedInstanceState) { | ||
// Inflate the layout for this fragment | ||
View view = inflater.inflate(R.layout.fragment_call_log_history, container, false); | ||
|
||
cometChatCallLogHistory = view.findViewById(R.id.call_logs_history); | ||
return view; | ||
} | ||
} |
58 changes: 58 additions & 0 deletions
58
...rc/main/java/com/cometchat/javasampleapp/fragments/calls/CallLogParticipantsFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package com.cometchat.javasampleapp.fragments.calls; | ||
|
||
import android.os.Bundle; | ||
|
||
import androidx.fragment.app.Fragment; | ||
|
||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import com.cometchat.calls.model.Participant; | ||
import com.cometchat.chatuikit.calls.callparticipants.CometChatCallLogParticipants; | ||
import com.cometchat.chatuikit.calls.callrecordings.CometChatCallLogRecordings; | ||
import com.cometchat.chatuikit.shared.cometchatuikit.CometChatUIKit; | ||
import com.cometchat.javasampleapp.R; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class CallLogParticipantsFragment extends Fragment { | ||
private CometChatCallLogParticipants cometChatCallLogParticipants; | ||
|
||
@Override | ||
public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||
Bundle savedInstanceState) { | ||
// Inflate the layout for this fragment | ||
View view = inflater.inflate(R.layout.fragment_call_log_participants, container, false); | ||
cometChatCallLogParticipants = view.findViewById(R.id.call_logs_participants); | ||
createCallParticipants(); | ||
return view; | ||
} | ||
|
||
private void createCallParticipants() { | ||
List<Participant> participants = new ArrayList<>(); | ||
|
||
Participant participant = new Participant(); | ||
participant.setUid(CometChatUIKit.getLoggedInUser().getUid()); | ||
participant.setName(CometChatUIKit.getLoggedInUser().getName()); | ||
participant.setAvatar(CometChatUIKit.getLoggedInUser().getAvatar()); | ||
participant.setJoinedAt(1327349241); | ||
participant.setHasJoined(true); | ||
participant.setTotalDurationInMinutes(1327349241); | ||
|
||
Participant participant1 = new Participant(); | ||
participant1.setUid("UID233"); | ||
participant1.setName("Kevin"); | ||
participant1.setAvatar("https://data-us.cometchat.io/assets/images/avatars/spiderman.png"); | ||
participant1.setJoinedAt(1327349241); | ||
participant1.setHasJoined(true); | ||
participant1.setTotalDurationInMinutes(1327349241); | ||
|
||
participants.add(participant); | ||
participants.add(participant1); | ||
cometChatCallLogParticipants.setParticipantList(participants); | ||
} | ||
|
||
|
||
} |
49 changes: 49 additions & 0 deletions
49
app/src/main/java/com/cometchat/javasampleapp/fragments/calls/CallLogRecordingFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.cometchat.javasampleapp.fragments.calls; | ||
|
||
import android.os.Bundle; | ||
|
||
import androidx.fragment.app.Fragment; | ||
|
||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import com.cometchat.calls.model.Recording; | ||
import com.cometchat.chatuikit.calls.callrecordings.CometChatCallLogRecordings; | ||
import com.cometchat.javasampleapp.R; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
|
||
public class CallLogRecordingFragment extends Fragment { | ||
|
||
private CometChatCallLogRecordings cometChatCallLogRecordings; | ||
|
||
@Override | ||
public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||
Bundle savedInstanceState) { | ||
// Inflate the layout for this fragment | ||
View view = inflater.inflate(R.layout.fragment_call_log_recording, container, false); | ||
cometChatCallLogRecordings = view.findViewById(R.id.call_logs_recordings); | ||
createCallRecordings(); | ||
return view; | ||
} | ||
|
||
private void createCallRecordings() { | ||
List<Recording> recordings = new ArrayList<>(); | ||
|
||
Recording recording = new Recording(); | ||
recording.setRecordingURL("https://recordings-us.cometchat.io/236497dcc2cd529b/2023-12-15/v1.us.236497dcc2cd529b.170264141733632a2e3171d8a5dcb1f82b743fbc2730422263_2023-12-15-11-57-16.mp4"); | ||
recording.setDuration(1327349241); | ||
recording.setRid("RID2023"); | ||
|
||
Recording recording1 = new Recording(); | ||
recording1.setRecordingURL("https://recordings-us.cometchat.io/236497dcc2cd529b/2023-12-15/v1.us.236497dcc2cd529b.170264141733632a2e3171d8a5dcb1f82b743fbc2730422263_2023-12-15-11-57-16.mp4"); | ||
recording1.setDuration(1327349241); | ||
recording1.setRid("RID2023-1"); | ||
recordings.add(recording); | ||
recordings.add(recording1); | ||
cometChatCallLogRecordings.setRecordingList(recordings); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...src/main/java/com/cometchat/javasampleapp/fragments/calls/CallLogWithDetailsFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.cometchat.javasampleapp.fragments.calls; | ||
|
||
import android.os.Bundle; | ||
|
||
import androidx.fragment.app.Fragment; | ||
|
||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import com.cometchat.javasampleapp.R; | ||
|
||
public class CallLogWithDetailsFragment extends Fragment { | ||
@Override | ||
public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||
Bundle savedInstanceState) { | ||
// Inflate the layout for this fragment | ||
return inflater.inflate(R.layout.fragment_call_log_with_details, container, false); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
app/src/main/java/com/cometchat/javasampleapp/fragments/calls/CallLogsFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
package com.cometchat.javasampleapp.fragments.calls; | ||
|
||
import android.os.Bundle; | ||
|
||
import androidx.fragment.app.Fragment; | ||
|
||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import com.cometchat.javasampleapp.R; | ||
|
||
public class CallLogsFragment extends Fragment { | ||
@Override | ||
public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||
Bundle savedInstanceState) { | ||
// Inflate the layout for this fragment | ||
return inflater.inflate(R.layout.fragment_call_logs, container, false); | ||
} | ||
} |
Oops, something went wrong.