Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
IMSDK_Demo
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王文龙
IMSDK_Demo
Commits
590e35fa
Commit
590e35fa
authored
Dec 14, 2020
by
王文龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update]更新群发功能
parent
e07bf5ca
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
28 deletions
+45
-28
build.gradle
app/build.gradle
+1
-1
MainActivity.java
app/src/main/java/com/offcn/imclient/ui/MainActivity.java
+9
-0
PushTranslateActivity.java
...ain/java/com/offcn/imclient/ui/PushTranslateActivity.java
+11
-9
activity_login.xml
app/src/main/res/layout/activity_login.xml
+19
-16
fragment_me.xml
app/src/main/res/layout/fragment_me.xml
+5
-2
No files found.
app/build.gradle
View file @
590e35fa
...
...
@@ -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'
...
...
app/src/main/java/com/offcn/imclient/ui/MainActivity.java
View file @
590e35fa
...
...
@@ -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
);
}
}
app/src/main/java/com/offcn/imclient/ui/PushTranslateActivity.java
View file @
590e35fa
...
...
@@ -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
();
...
...
app/src/main/res/layout/activity_login.xml
View file @
590e35fa
<?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
app/src/main/res/layout/fragment_me.xml
View file @
590e35fa
...
...
@@ -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=
"
2
0dp"
android:background=
"@
android:color/darker_gra
y"
android:layout_margin=
"
5
0dp"
android:background=
"@
color/colorPrimar
y"
android:gravity=
"center"
android:padding=
"10dp"
android:textColor=
"@android:color/white"
android:text=
"退出登录"
android:textSize=
"16sp"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment