Skip to content

Commit cd91503

Browse files
committed
Adding optional meeting id join
1 parent c0091af commit cd91503

File tree

3 files changed

+77
-21
lines changed

3 files changed

+77
-21
lines changed

articles/communication-services/quickstarts/voice-video-calling/includes/teams-interop/teams-interop-android.md

Lines changed: 61 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Find the finalized code for this quickstart on [GitHub](https://github.com/Azure
1717

1818
- A working [Communication Services calling Android app](../../getting-started-with-calling.md).
1919
- A [Teams deployment](/deployoffice/teams-install).
20+
- The Minimum Version supported for Teams meeting Id and passcode join API : 2.9.0
2021
- An [access token](../../../identity/access-tokens.md).
2122

2223

@@ -32,19 +33,46 @@ Replace code in activity_main.xml with following snippet. The text box will be u
3233
android:layout_width="match_parent"
3334
android:layout_height="match_parent"
3435
tools:context=".MainActivity">
35-
36-
<EditText
37-
android:id="@+id/teams_meeting_link"
38-
android:layout_width="match_parent"
39-
android:layout_height="wrap_content"
40-
android:ems="10"
41-
android:hint="Teams meeting link"
42-
android:inputType="textUri"
43-
android:layout_marginTop="100dp"
44-
android:layout_marginHorizontal="20dp"
45-
app:layout_constraintEnd_toEndOf="parent"
46-
app:layout_constraintStart_toStartOf="parent"
47-
app:layout_constraintTop_toTopOf="parent" />
36+
37+
<LinearLayout
38+
android:id="@+id/meetingInfoLinearLayout"
39+
android:layout_width="match_parent"
40+
android:layout_height="match_parent"
41+
android:orientation="vertical"
42+
android:layout_marginTop="100dp">
43+
44+
<EditText
45+
android:id="@+id/teams_meeting_link"
46+
android:layout_width="match_parent"
47+
android:layout_height="wrap_content"
48+
android:ems="10"
49+
android:hint="Teams meeting link"
50+
android:inputType="textUri" />
51+
52+
<TextView
53+
android:layout_width="match_parent"
54+
android:layout_height="wrap_content"
55+
android:text="or"
56+
android:textAlignment="center"
57+
android:layout_marginTop="10dp"/>
58+
59+
<EditText
60+
android:id="@+id/teams_meeting_id"
61+
android:layout_width="match_parent"
62+
android:layout_height="wrap_content"
63+
android:ems="10"
64+
android:hint="Teams meeting id"
65+
android:inputType="textUri" />
66+
67+
<EditText
68+
android:id="@+id/teams_meeting_passcode"
69+
android:layout_width="match_parent"
70+
android:layout_height="wrap_content"
71+
android:ems="10"
72+
android:hint="Teams meeting passcode"
73+
android:inputType="textUri" />
74+
75+
</LinearLayout>
4876

4977
<LinearLayout
5078
android:layout_width="match_parent"
@@ -120,6 +148,8 @@ import com.azure.android.communication.calling.HangUpOptions;
120148
import com.azure.android.communication.calling.JoinCallOptions;
121149
import com.azure.android.communication.common.CommunicationTokenCredential;
122150
import com.azure.android.communication.calling.TeamsMeetingLinkLocator;
151+
// import for meeting id and passcode join
152+
// import com.azure.android.communication.calling.TeamsMeetingIdLocator;
123153

124154
public class MainActivity extends AppCompatActivity {
125155
private static final String[] allPermissions = new String[] { Manifest.permission.RECORD_AUDIO, Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_PHONE_STATE };
@@ -159,17 +189,28 @@ public class MainActivity extends AppCompatActivity {
159189
}
160190

161191
EditText calleeIdView = findViewById(R.id.teams_meeting_link);
192+
EditText calleeMeetingId = findViewById(R.id.teams_meeting_id);
193+
EditText calleeMeetingPasscode = findViewById(R.id.teams_meeting_passcode);
162194
String meetingLink = calleeIdView.getText().toString();
195+
String meetingId = calleeMeetingId.getText().toString();
196+
String passcode = calleeMeetingPasscode.getText().toString();
197+
163198
if (meetingLink.isEmpty()) {
164199
Toast.makeText(this, "Please enter Teams meeting link", Toast.LENGTH_SHORT).show();
165200
return;
166201
}
167202

168203
JoinCallOptions options = new JoinCallOptions();
169-
TeamsMeetingLinkLocator teamsMeetingLinkLocator = new TeamsMeetingLinkLocator(meetingLink);
204+
205+
// join with meeting link
206+
TeamsMeetingLinkLocator teamsMeetingLocator = new TeamsMeetingLinkLocator(meetingLink);
207+
208+
// (or) to join with meetingId and passcode use the below code snippet.
209+
//TeamsMeetingIdLocator teamsMeetingIdLocator = new TeamsMeetingIdLocator(meetingId, passcode);
210+
170211
call = agent.join(
171212
getApplicationContext(),
172-
teamsMeetingLinkLocator,
213+
teamsMeetingLocator,
173214
options);
174215
call.addOnStateChangedListener(p -> setCallStatus(call.getState().toString()));
175216
call.addOnIsRecordingActiveChangedListener(p -> setRecordingStatus(call.isRecordingActive()));
@@ -255,6 +296,11 @@ public class MainActivity extends AppCompatActivity {
255296
The Teams meeting link can be retrieved using Graph APIs. This is detailed in [Graph documentation](/graph/api/onlinemeeting-createorget?tabs=http&view=graph-rest-beta&preserve-view=true).
256297
The Communication Services Calling SDK accepts a full Teams meeting link. This link is returned as part of the `onlineMeeting` resource, accessible under the [`joinWebUrl` property](/graph/api/resources/onlinemeeting?view=graph-rest-beta&preserve-view=true). You can also get the required meeting information from the **Join Meeting** URL in the Teams meeting invite itself.
257298

299+
## Get the Teams meeting ID and passcode
300+
* Graph API: Use Graph API to retrieve information about onlineMeeting resource and check the object in property joinMeetingIdSettings.
301+
* Teams: In your Teams application, go to Calendar app and open details of a meeting. Online meetings have meeting ID and passcode in the definition of the meeting.
302+
* Outlook: You can find the meeting ID & passcode in calendar events or in email meeting invites.
303+
258304
## Launch the app and join Teams meeting
259305

260306
The app can now be launched using the "Run App" button on the toolbar (Shift+F10). You should see the following:

articles/communication-services/quickstarts/voice-video-calling/includes/teams-interop/teams-interop-ios.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ import AVFoundation
4444

4545
struct ContentView: View {
4646
@State var meetingLink: String = ""
47+
@State var meetingId: String = ""
48+
@State var meetingPasscode: String = ""
4749
@State var callStatus: String = ""
4850
@State var message: String = ""
4951
@State var recordingStatus: String = ""
@@ -57,6 +59,8 @@ struct ContentView: View {
5759
Form {
5860
Section {
5961
TextField("Teams meeting link", text: $meetingLink)
62+
TextField("Teams meeting id", text: $meetingId)
63+
TextField("Teams meeting passcode", text: $meetingPasscode)
6064
Button(action: joinTeamsMeeting) {
6165
Text("Join Teams Meeting")
6266
}.disabled(callAgent == nil)
@@ -100,8 +104,14 @@ struct ContentView: View {
100104
AVAudioSession.sharedInstance().requestRecordPermission { (granted) in
101105
if granted {
102106
let joinCallOptions = JoinCallOptions()
103-
let teamsMeetingLinkLocator = TeamsMeetingLinkLocator(meetingLink: self.meetingLink)
104-
self.callAgent?.join(with: teamsMeetingLinkLocator, joinCallOptions: joinCallOptions) {(call, error) in
107+
108+
// join with meeting link
109+
let teamsMeetingLocator = TeamsMeetingLinkLocator(meetingLink: self.meetingLink)
110+
111+
// (or) to join with meetingId and passcode use the below code snippet.
112+
// let teamsMeetingLocator = TeamsMeetingIdLocator(with: self.meetingId, passcode: self.meetingPasscode)
113+
114+
self.callAgent?.join(with: teamsMeetingLocator, joinCallOptions: joinCallOptions) {(call, error) in
105115
if (error == nil) {
106116
self.call = call
107117
self.callObserver = CallObserver(self)

articles/communication-services/quickstarts/voice-video-calling/includes/teams-interop/teams-interop-windows.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,14 @@ namespace CallingQuickstart
131131
var meetingId = CalleeMeetingId.Text.Trim();
132132
var passcode = CalleeMeetingPasscode.Text.Trim();
133133

134+
// join with meeting link
134135
if (!string.IsNullOrEmpty(callString))
135136
{
136137
call = await JoinTeamsMeetingByLinkAsync(teamsMeetinglink);
137138
}
138-
else if (!string.IsNullOrEmpty(meetingId) && !string.IsNullOrEmpty(passcode))
139-
{
140-
call = await JoinTeamsMeetingByMeetingIdAsync(meetingId, passcode);
141-
}
139+
140+
// (or) to join with meetingId and passcode use the below code snippet.
141+
// call = await JoinTeamsMeetingByMeetingIdAsync(meetingId, passcode);
142142
143143
if (call != null)
144144
{

0 commit comments

Comments
 (0)