Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccim_sdk_android
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
ccim_sdk_android
Commits
8e5eb158
Commit
8e5eb158
authored
Sep 22, 2022
by
sheteng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
语音房间 禁言1
parent
9aa23093
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
48 deletions
+24
-48
app/build.gradle
app/build.gradle
+0
-1
app/src/main/AndroidManifest.xml
app/src/main/AndroidManifest.xml
+2
-2
app/src/main/java/com/ccwangluo/im/data/LoginViewModel.java
app/src/main/java/com/ccwangluo/im/data/LoginViewModel.java
+5
-4
app/src/main/java/com/ccwangluo/im/ui/notifications/NotificationsFragment.java
.../ccwangluo/im/ui/notifications/NotificationsFragment.java
+3
-2
app/src/main/res/layout/activity_login.xml
app/src/main/res/layout/activity_login.xml
+2
-2
ccim/build.gradle
ccim/build.gradle
+12
-1
ccim/src/main/java/com/ccwangluo/ccim/CCIMClient.java
ccim/src/main/java/com/ccwangluo/ccim/CCIMClient.java
+0
-36
No files found.
app/build.gradle
View file @
8e5eb158
...
...
@@ -79,7 +79,6 @@ dependencies {
def
room_version
=
"2.3.0"
implementation
"androidx.room:room-runtime:$room_version"
annotationProcessor
"androidx.room:room-compiler:$room_version"
implementation
'com.guolindev.permissionx:permissionx:1.6.4'
...
...
app/src/main/AndroidManifest.xml
View file @
8e5eb158
...
...
@@ -26,7 +26,7 @@
android:name=
".MainActivity2"
android:exported=
"true"
android:label=
"@string/title_activity_main2"
android:screenOrientation=
"
fullSensor
"
>
android:screenOrientation=
"
portrait
"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
@@ -36,7 +36,7 @@
<activity
android:name=
".ui.login.LoginActivity"
android:label=
"@string/app_name"
android:screenOrientation=
"
fullSensor
"
android:theme=
"@style/Theme.CcwangluoIm.NoActionBar"
>
android:screenOrientation=
"
portrait
"
android:theme=
"@style/Theme.CcwangluoIm.NoActionBar"
>
</activity>
</application>
...
...
app/src/main/java/com/ccwangluo/im/data/LoginViewModel.java
View file @
8e5eb158
...
...
@@ -18,6 +18,7 @@ import com.ccwangluo.im.util.ToastUtil;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.HashSet
;
import
java.util.List
;
public
class
LoginViewModel
extends
ViewModel
{
...
...
@@ -29,7 +30,7 @@ public class LoginViewModel extends ViewModel {
public
MutableLiveData
<
MessageContent
>
privateMsgList
=
new
MutableLiveData
<>();
public
MutableLiveData
<
MessageContent
>
channelMsgList
=
new
MutableLiveData
<>();
public
MutableLiveData
<
Lis
t
<
Long
>>
channelList
=
new
MutableLiveData
<>();
public
MutableLiveData
<
HashSe
t
<
Long
>>
channelList
=
new
MutableLiveData
<>();
public
void
login
(
Context
context
,
String
appKey
,
String
appsecret
,
String
username
,
String
userId
,
String
server
,
String
ip
,
int
port
)
{
Long
id
=
Long
.
parseLong
(
userId
);
...
...
@@ -74,9 +75,9 @@ public class LoginViewModel extends ViewModel {
}
public
void
addChannelId
(
long
id
)
{
Lis
t
<
Long
>
value
=
channelList
.
getValue
();
HashSe
t
<
Long
>
value
=
channelList
.
getValue
();
if
(
value
==
null
)
{
value
=
new
ArrayLis
t
<>();
value
=
new
HashSe
t
<>();
}
value
.
add
(
id
);
channelList
.
postValue
(
value
);
...
...
@@ -84,7 +85,7 @@ public class LoginViewModel extends ViewModel {
}
public
void
removeChannelId
(
long
id
)
{
Lis
t
<
Long
>
value
=
channelList
.
getValue
();
HashSe
t
<
Long
>
value
=
channelList
.
getValue
();
if
(
value
==
null
)
{
return
;
}
...
...
app/src/main/java/com/ccwangluo/im/ui/notifications/NotificationsFragment.java
View file @
8e5eb158
...
...
@@ -36,6 +36,7 @@ import com.ccwangluo.im.ui.login.TestActivity;
import
com.ccwangluo.im.util.ToastUtil
;
import
java.util.ArrayList
;
import
java.util.HashSet
;
import
java.util.List
;
public
class
NotificationsFragment
extends
Fragment
{
...
...
@@ -73,9 +74,9 @@ public class NotificationsFragment extends Fragment {
binding
.
channelList
.
setAdapter
(
channelAdapter
);
loginViewModel
.
channelList
.
observe
(
getViewLifecycleOwner
(),
new
Observer
<
Lis
t
<
Long
>>()
{
loginViewModel
.
channelList
.
observe
(
getViewLifecycleOwner
(),
new
Observer
<
HashSe
t
<
Long
>>()
{
@Override
public
void
onChanged
(
Lis
t
<
Long
>
longs
)
{
public
void
onChanged
(
HashSe
t
<
Long
>
longs
)
{
list
.
clear
();
list
.
addAll
(
longs
);
channelAdapter
.
notifyDataSetChanged
();
...
...
app/src/main/res/layout/activity_login.xml
View file @
8e5eb158
...
...
@@ -27,7 +27,7 @@
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:hint=
"UserId"
android:text=
"
20
"
android:text=
"
5
"
android:imeActionLabel=
"@string/action_sign_in_short"
android:imeOptions=
"actionDone"
android:selectAllOnFocus=
"true"
...
...
@@ -69,7 +69,7 @@
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:hint=
"ip"
android:text=
"10
.17.4.20
7"
android:text=
"10
6.15.237.6
7"
android:imeActionLabel=
"@string/action_sign_in_short"
android:imeOptions=
"actionDone"
android:selectAllOnFocus=
"true"
...
...
ccim/build.gradle
View file @
8e5eb158
...
...
@@ -21,6 +21,7 @@ android {
release
{
minifyEnabled
false
proguardFiles
getDefaultProguardFile
(
'proguard-android-optimize.txt'
),
'proguard-rules.pro'
}
}
compileOptions
{
...
...
@@ -41,6 +42,14 @@ android {
}
android
.
libraryVariants
.
all
{
variant
->
variant
.
outputs
.
all
{
def
date
=
new
Date
().
format
(
"yyyyMMdd"
,
TimeZone
.
getTimeZone
(
"GMT+08"
))
outputFileName
=
"ccim_${date}.aar"
}
}
protobuf
{
//配置protoc编译器
protoc
{
...
...
@@ -64,9 +73,11 @@ repositories {
dirs
'libs'
}
}
dependencies
{
compileOnly
(
name:
'janus-release'
,
ext:
'aar'
)
implementation
'androidx.appcompat:appcompat:1.3.1'
//
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation
'com.google.protobuf:protobuf-java:3.13.0'
implementation
'com.google.protobuf:protobuf-java-util:3.12.0'
implementation
'com.google.code.gson:gson:2.8.7'
...
...
ccim/src/main/java/com/ccwangluo/ccim/CCIMClient.java
View file @
8e5eb158
...
...
@@ -139,42 +139,6 @@ public class CCIMClient {
});
initCachePath
(
context
);
registerMessageListener
(
new
OnPushMsgListener
()
{
@Override
public
void
pushPrivateMsg
(
MessageContent
msg
)
{
}
@Override
public
void
pushChannelMsg
(
MessageContent
msg
)
{
}
@Override
public
void
pushNewContact
(
Contact
contact
)
{
}
@Override
public
void
pushDeleteContact
(
Long
contactId
)
{
}
@Override
public
void
pushContactNetStatus
(
Long
contactId
,
NetStatus
status
)
{
}
@Override
public
void
pushContactNewReq
(
User
user
)
{
}
@Override
public
void
pushUserMutedRes
(
Long
mutedExpiredAt
)
{
}
});
}
/**
...
...
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