Skip to content

Commit 394ce97

Browse files
author
Nick
committed
Change to SDK 2.5.0
1 parent a7c5960 commit 394ce97

File tree

7 files changed

+42
-21
lines changed

7 files changed

+42
-21
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ repositories {
5353
}
5454

5555
dependencies {
56-
implementation('com.ciscowebex:androidsdk:2.5.0-SNAPSHOT@aar', {
56+
implementation('com.ciscowebex:androidsdk:2.5.0@aar', {
5757
transitive = true
5858
changing = true
5959
})

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<uses-permission android:name="android.permission.WAKE_LOCK" />
2828
<uses-permission android:name="android.permission.GET_TASKS" />
2929
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
30+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
3031

3132
<application
3233
android:name="com.ciscowebex.androidsdk.kitchensink.KitchenSinkApp"

app/src/main/java/com/ciscowebex/androidsdk/kitchensink/launcher/fragments/CallFragment.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
import android.content.ServiceConnection;
3535
import android.content.pm.PackageManager;
3636
import android.content.res.Configuration;
37+
import android.graphics.Rect;
38+
import android.graphics.drawable.Drawable;
3739
import android.net.Uri;
3840
import android.os.Binder;
3941
import android.os.Build;
@@ -184,6 +186,15 @@ public class CallFragment extends BaseFragment {
184186
@BindView(R.id.floatButton)
185187
ImageView floatButton;
186188

189+
@BindView(R.id.tab_callcontrol)
190+
TextView tabCallControl;
191+
192+
@BindView(R.id.tab_aux_video)
193+
TextView tabAuxVideo;
194+
195+
@BindView(R.id.tab_participants)
196+
TextView tabParticipants;
197+
187198
private ParticipantsAdapter participantsAdapter;
188199
private Snackbar snackbar;
189200

@@ -222,6 +233,17 @@ public static CallFragment newInstance(String id) {
222233
@Override
223234
public void onStart() {
224235
super.onStart();
236+
Drawable drawableCallControl = getResources().getDrawable(R.drawable.ic_file_word, null);
237+
Drawable drawableAuxVideo = getResources().getDrawable(R.drawable.ic_file_excel, null);
238+
Drawable drawableParticipants = getResources().getDrawable(R.drawable.ic_file_zip, null);
239+
Rect bounds = new Rect(0, 0, 120, 120);
240+
drawableCallControl.setBounds(bounds);
241+
drawableAuxVideo.setBounds(bounds);
242+
drawableParticipants.setBounds(bounds);
243+
tabCallControl.setCompoundDrawables(null, drawableCallControl, null, null);
244+
tabAuxVideo.setCompoundDrawables(null, drawableAuxVideo, null, null);
245+
tabParticipants.setCompoundDrawables(null, drawableParticipants, null, null);
246+
225247
agent = WebexAgent.getInstance();
226248
screenSwitcher = new FullScreenSwitcher(getActivity(), layout, remoteView);
227249
updateScreenShareView();

app/src/main/java/com/ciscowebex/androidsdk/kitchensink/launcher/fragments/LauncherFragment.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import com.ciscowebex.androidsdk.kitchensink.ui.BaseFragment;
3434

3535
import org.greenrobot.eventbus.Subscribe;
36+
import org.greenrobot.eventbus.ThreadMode;
3637

3738
import butterknife.OnClick;
3839

@@ -84,8 +85,8 @@ public void logout() {
8485
}
8586

8687
@SuppressWarnings("unused")
87-
@Subscribe
88-
public void onEventMainThread(LogoutEvent event) {
88+
@Subscribe(threadMode = ThreadMode.MAIN)
89+
public void onMessageEvent(LogoutEvent event) {
8990
dismissBusyIndicator();
9091
toast("Logout success");
9192
Intent i = new Intent(getActivity(), LoginActivity.class);

app/src/main/java/com/ciscowebex/androidsdk/kitchensink/launcher/fragments/MessageFragment.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import android.widget.ImageView;
2626
import android.widget.ProgressBar;
2727
import android.widget.TextView;
28+
import android.widget.Toast;
2829

2930
import com.ciscowebex.androidsdk.kitchensink.R;
3031
import com.ciscowebex.androidsdk.kitchensink.actions.WebexAgent;
@@ -203,7 +204,7 @@ private void hideSoftKeyboard() {
203204
InputMethodManager inputMethodManager =
204205
(InputMethodManager) getActivity().getSystemService(
205206
Activity.INPUT_METHOD_SERVICE);
206-
if (inputMethodManager != null) {
207+
if (inputMethodManager != null && getActivity().getCurrentFocus() != null) {
207208
inputMethodManager.hideSoftInputFromWindow(
208209
getActivity().getCurrentFocus().getWindowToken(), 0);
209210
}
@@ -213,7 +214,9 @@ private void hideSoftKeyboard() {
213214
public void sendMessage(View btn) {
214215
if (!TextUtils.isEmpty(textMessage.getText())) {
215216
btn.setEnabled(false);
216-
messageClient.postToSpace(targetId, textMessage.getText().toString(), generateMentions(), generateLocalFiles(), rst -> {
217+
messageClient.post(targetId, Message.draft(Message.Text.plain(textMessage.getText().toString()))
218+
.addMentions(generateMentions())
219+
.addAttachments(generateLocalFiles()), rst -> {
217220
Ln.e("posted:" + rst);
218221
selectedFile.clear();
219222
btn.setEnabled(true);

app/src/main/res/layout/fragment_call.xml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,39 +68,36 @@
6868
android:id="@+id/view_bottom_bar"
6969
android:layout_width="match_parent"
7070
android:orientation="horizontal"
71-
android:layout_height="55dp"
71+
android:layout_height="wrap_content"
7272
android:padding="5dp"
7373
app:layout_constraintBottom_toBottomOf="parent">
7474

7575
<TextView
7676
android:id="@+id/tab_callcontrol"
7777
android:layout_width="0dp"
78-
android:layout_height="match_parent"
78+
android:layout_height="wrap_content"
7979
android:layout_weight="1"
8080
android:text="Call Control"
81-
android:textSize="8sp"
82-
android:gravity="center"
83-
android:drawableTop="@drawable/ic_file_word" />
81+
android:textSize="14sp"
82+
android:gravity="center" />
8483

8584
<TextView
8685
android:id="@+id/tab_aux_video"
8786
android:layout_width="0dp"
88-
android:layout_height="match_parent"
87+
android:layout_height="wrap_content"
8988
android:layout_weight="1"
9089
android:text="Auxiliary Videos"
91-
android:textSize="8sp"
92-
android:gravity="center"
93-
android:drawableTop="@drawable/ic_file_excel" />
90+
android:textSize="14sp"
91+
android:gravity="center" />
9492

9593
<TextView
9694
android:id="@+id/tab_participants"
9795
android:layout_width="0dp"
98-
android:layout_height="match_parent"
96+
android:layout_height="wrap_content"
9997
android:layout_weight="1"
10098
android:text="Participants"
101-
android:textSize="8sp"
102-
android:gravity="center"
103-
android:drawableTop="@drawable/ic_file_zip"/>
99+
android:textSize="14sp"
100+
android:gravity="center"/>
104101
</LinearLayout>
105102

106103
<ScrollView

build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ allprojects {
2727
repositories {
2828
jcenter()
2929
google()
30-
maven {
31-
url 'https://devhub.cisco.com/artifactory/webexsdk-SNAPSHOT/'
32-
}
3330
maven {
3431
url 'https://devhub.cisco.com/artifactory/webexsdk/'
3532
}

0 commit comments

Comments
 (0)