Skip to content

Commit

Permalink
Change to SDK 2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick committed Apr 13, 2020
1 parent a7c5960 commit 394ce97
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 21 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ repositories {
}

dependencies {
implementation('com.ciscowebex:androidsdk:2.5.0-SNAPSHOT@aar', {
implementation('com.ciscowebex:androidsdk:2.5.0@aar', {
transitive = true
changing = true
})
Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

<application
android:name="com.ciscowebex.androidsdk.kitchensink.KitchenSinkApp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
import android.content.ServiceConnection;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Binder;
import android.os.Build;
Expand Down Expand Up @@ -184,6 +186,15 @@ public class CallFragment extends BaseFragment {
@BindView(R.id.floatButton)
ImageView floatButton;

@BindView(R.id.tab_callcontrol)
TextView tabCallControl;

@BindView(R.id.tab_aux_video)
TextView tabAuxVideo;

@BindView(R.id.tab_participants)
TextView tabParticipants;

private ParticipantsAdapter participantsAdapter;
private Snackbar snackbar;

Expand Down Expand Up @@ -222,6 +233,17 @@ public static CallFragment newInstance(String id) {
@Override
public void onStart() {
super.onStart();
Drawable drawableCallControl = getResources().getDrawable(R.drawable.ic_file_word, null);
Drawable drawableAuxVideo = getResources().getDrawable(R.drawable.ic_file_excel, null);
Drawable drawableParticipants = getResources().getDrawable(R.drawable.ic_file_zip, null);
Rect bounds = new Rect(0, 0, 120, 120);
drawableCallControl.setBounds(bounds);
drawableAuxVideo.setBounds(bounds);
drawableParticipants.setBounds(bounds);
tabCallControl.setCompoundDrawables(null, drawableCallControl, null, null);
tabAuxVideo.setCompoundDrawables(null, drawableAuxVideo, null, null);
tabParticipants.setCompoundDrawables(null, drawableParticipants, null, null);

agent = WebexAgent.getInstance();
screenSwitcher = new FullScreenSwitcher(getActivity(), layout, remoteView);
updateScreenShareView();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import com.ciscowebex.androidsdk.kitchensink.ui.BaseFragment;

import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

import butterknife.OnClick;

Expand Down Expand Up @@ -84,8 +85,8 @@ public void logout() {
}

@SuppressWarnings("unused")
@Subscribe
public void onEventMainThread(LogoutEvent event) {
@Subscribe(threadMode = ThreadMode.MAIN)
public void onMessageEvent(LogoutEvent event) {
dismissBusyIndicator();
toast("Logout success");
Intent i = new Intent(getActivity(), LoginActivity.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;

import com.ciscowebex.androidsdk.kitchensink.R;
import com.ciscowebex.androidsdk.kitchensink.actions.WebexAgent;
Expand Down Expand Up @@ -203,7 +204,7 @@ private void hideSoftKeyboard() {
InputMethodManager inputMethodManager =
(InputMethodManager) getActivity().getSystemService(
Activity.INPUT_METHOD_SERVICE);
if (inputMethodManager != null) {
if (inputMethodManager != null && getActivity().getCurrentFocus() != null) {
inputMethodManager.hideSoftInputFromWindow(
getActivity().getCurrentFocus().getWindowToken(), 0);
}
Expand All @@ -213,7 +214,9 @@ private void hideSoftKeyboard() {
public void sendMessage(View btn) {
if (!TextUtils.isEmpty(textMessage.getText())) {
btn.setEnabled(false);
messageClient.postToSpace(targetId, textMessage.getText().toString(), generateMentions(), generateLocalFiles(), rst -> {
messageClient.post(targetId, Message.draft(Message.Text.plain(textMessage.getText().toString()))
.addMentions(generateMentions())
.addAttachments(generateLocalFiles()), rst -> {
Ln.e("posted:" + rst);
selectedFile.clear();
btn.setEnabled(true);
Expand Down
23 changes: 10 additions & 13 deletions app/src/main/res/layout/fragment_call.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,39 +68,36 @@
android:id="@+id/view_bottom_bar"
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_height="55dp"
android:layout_height="wrap_content"
android:padding="5dp"
app:layout_constraintBottom_toBottomOf="parent">

<TextView
android:id="@+id/tab_callcontrol"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Call Control"
android:textSize="8sp"
android:gravity="center"
android:drawableTop="@drawable/ic_file_word" />
android:textSize="14sp"
android:gravity="center" />

<TextView
android:id="@+id/tab_aux_video"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Auxiliary Videos"
android:textSize="8sp"
android:gravity="center"
android:drawableTop="@drawable/ic_file_excel" />
android:textSize="14sp"
android:gravity="center" />

<TextView
android:id="@+id/tab_participants"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Participants"
android:textSize="8sp"
android:gravity="center"
android:drawableTop="@drawable/ic_file_zip"/>
android:textSize="14sp"
android:gravity="center"/>
</LinearLayout>

<ScrollView
Expand Down
3 changes: 0 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ allprojects {
repositories {
jcenter()
google()
maven {
url 'https://devhub.cisco.com/artifactory/webexsdk-SNAPSHOT/'
}
maven {
url 'https://devhub.cisco.com/artifactory/webexsdk/'
}
Expand Down

0 comments on commit 394ce97

Please sign in to comment.