Commit 590e35fa by 王文龙

[update]更新群发功能

parent e07bf5ca
......@@ -94,7 +94,7 @@ dependencies {
implementation 'com.android.support:multidex:1.0.3'
implementation("com.offcn.live:titleview:1.1.0-s1")
implementation("com.offcn.live:imsdk-kit:1.0.0.9")
implementation("com.offcn.live:imsdk-kit:1.0.0.11")
// DB
implementation 'org.greenrobot:greendao:3.2.2'
......
......@@ -133,4 +133,13 @@ public class MainActivity extends BaseActivity {
// 清除通知栏消息
OIMSDK.getInstance().clearNotification();
}
@Override
public void onBackPressed() {
// super.onBackPressed();
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addCategory(Intent.CATEGORY_HOME);
startActivity(intent);
}
}
......@@ -13,7 +13,7 @@ import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
/**
* 华为推送,通知栏点击处理类
* 推送通知栏点击处理类
*/
public class PushTranslateActivity extends AppCompatActivity {
private static final String TAG = PushTranslateActivity.class.getSimpleName();
......@@ -30,14 +30,16 @@ public class PushTranslateActivity extends AppCompatActivity {
if (!TextUtils.isEmpty(content)) {
// 跳转到页面需要保证 OIMSDK 连接成功,所以建议先跳转到应用首页进行全局初始化操作,若跳转到聊天页需要先连接 OIMSDK 初始化
ZGLLogUtils.e(TAG, "push : " + content);
OIMMsg oimMsg = ZGLParseUtils.parseObjectByGson(content, OIMMsg.class);
if(oimMsg != null) {
OIMMsgBody msgBody = oimMsg.getBody();
if (msgBody != null) {
// DemoChatActivity.newInstance(this, msgBody.getMsg_to(), msgBody.getMsg_from(), msgBody.getMsg_seq());
startActivity(new Intent(this, SplashActivity.class));
}
}
startActivity(new Intent(this, SplashActivity.class));
// OIMMsg oimMsg = ZGLParseUtils.parseObjectByGson(content, OIMMsg.class);
// if(oimMsg != null) {
// OIMMsgBody msgBody = oimMsg.getBody();
// if (msgBody != null) {
//// DemoChatActivity.newInstance(this, msgBody.getMsg_to(), msgBody.getMsg_from(), msgBody.getMsg_seq());
// }
// }
}
finish();
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_margin="30dp"
android:focusableInTouchMode="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="50dp"
android:fitsSystemWindows="true"
android:focusable="true"
android:layout_height="match_parent">
android:focusableInTouchMode="true"
android:orientation="vertical">
<com.jyall.base.view.ClearEditText
android:id="@+id/et_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/et_name"
android:singleLine="true"
android:hint="请输入用户名"/>
android:hint="请输入用户名"
android:singleLine="true" />
<com.jyall.base.view.ClearEditText
android:id="@+id/et_pwd"
android:layout_width="match_parent"
android:layout_marginTop="20dp"
android:layout_height="wrap_content"
android:singleLine="true"
android:id="@+id/et_pwd"
android:hint="请输入密码"/>
android:layout_marginTop="20dp"
android:hint="请输入密码"
android:singleLine="true" />
<TextView
android:id="@+id/tv_login"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="50dp"
android:text="登录"
android:textSize="16sp"
android:background="@color/colorPrimary"
android:gravity="center"
android:text="登录"
android:textColor="@android:color/white"
android:layout_height="50dp"
android:id="@+id/tv_login"
android:background="@color/colorPrimary"/>
android:textSize="16sp" />
</LinearLayout>
\ No newline at end of file
......@@ -17,16 +17,19 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textSize="16sp"
android:textColor="@color/color_333333"
tools:text="我是名字" />
<TextView
android:id="@+id/btn_logout"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_margin="20dp"
android:background="@android:color/darker_gray"
android:layout_margin="50dp"
android:background="@color/colorPrimary"
android:gravity="center"
android:padding="10dp"
android:textColor="@android:color/white"
android:text="退出登录"
android:textSize="16sp" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment