Skip to content

Commit

Permalink
update sdk release
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxiaozhong committed Jul 31, 2020
1 parent aea1df6 commit e81bbaf
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 2 deletions.
3 changes: 1 addition & 2 deletions AR-RTM-Tutorial-Android/sample/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ dependencies {
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.22'

//rtm
implementation 'org.ar:rtm:1.0.0.4'
implementation 'org.ar:rtm:1.0.0.6'
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.os.Bundle;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
import android.widget.TextView;
Expand Down Expand Up @@ -276,4 +277,14 @@ public boolean onKeyDown(int keyCode, KeyEvent event) {
return super.onKeyDown(keyCode, event);
}

public void Leave(View view) {
if (type==1){//单聊
}else {
rtmChannel.leave(null);
rtmChannel.release();
rtmChannel=null;
}
RTMApplication.getInstance().getRtmManager().unregisterListener(rtmClientListener);
finish();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,6 @@ public void onFailure(ErrorInfo var1) {


}


}
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,11 @@ public boolean onKeyDown(int keyCode, KeyEvent event) {
}
return super.onKeyDown(keyCode, event);
}

public void Leave(View view) {
RTMApplication.getInstance().getRtmManager().getRtmClient().logout(null);
RTMApplication.getInstance().ReleaseRtmManager();
RTMApplication.getInstance().setUserId("");
finish();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,28 @@

</EditText>

<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_below="@+id/card"
android:layout_marginRight="20dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
app:cardElevation="4dp"
app:cardBackgroundColor="#333333"
android:layout_marginLeft="20dp"
android:layout_height="50dp"
>

<Button
android:onClick="Leave"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="#ffffff"
android:background="@android:color/transparent"
android:text="退出"></Button>

</androidx.cardview.widget.CardView>


</LinearLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,6 @@

</androidx.cardview.widget.CardView>



</LinearLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,27 @@

</androidx.cardview.widget.CardView>

<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_below="@+id/card"
android:layout_marginRight="20dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
app:cardElevation="4dp"
app:cardBackgroundColor="#333333"
android:layout_marginLeft="20dp"
android:layout_height="50dp"
>

<Button
android:onClick="Leave"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="#ffffff"
android:background="@android:color/transparent"
android:text="退出"></Button>

</androidx.cardview.widget.CardView>


</LinearLayout>
Binary file modified SDK/rtm-release.aar
Binary file not shown.

0 comments on commit e81bbaf

Please sign in to comment.