Commit 7031d75ca4a708ccdab314799960495af0dc392d
1 parent
f44353d0
更新聊天SDK
Showing
5 changed files
with
4 additions
and
6 deletions
app/build.gradle
| @@ -43,7 +43,7 @@ dependencies { | @@ -43,7 +43,7 @@ dependencies { | ||
| 43 | }) | 43 | }) |
| 44 | compile 'com.android.support:appcompat-v7:23.4.0' | 44 | compile 'com.android.support:appcompat-v7:23.4.0' |
| 45 | compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha9' | 45 | compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha9' |
| 46 | - testCompile 'junit:junit:4.12' | ||
| 47 | compile 'com.android.support:recyclerview-v7:23.0.0' | 46 | compile 'com.android.support:recyclerview-v7:23.0.0' |
| 48 | compile 'com.github.bumptech.glide:glide:3.7.0' | 47 | compile 'com.github.bumptech.glide:glide:3.7.0' |
| 48 | + testCompile 'junit:junit:4.12' | ||
| 49 | } | 49 | } |
app/libs/libcnliveutil.jar
No preview for this file type
app/src/main/java/com/cnlive/im/CNLiveApplication.java
| @@ -14,7 +14,7 @@ public class CNLiveApplication extends Application { | @@ -14,7 +14,7 @@ public class CNLiveApplication extends Application { | ||
| 14 | @Override | 14 | @Override |
| 15 | public void onCreate() { | 15 | public void onCreate() { |
| 16 | super.onCreate(); | 16 | super.onCreate(); |
| 17 | - Config.init(this, "60_j07o9s9b65", "dc1e76f87c7c2d83dcedb8a1204ec22fca3e156b21eb0d",true); | 17 | + Config.init(this, "60_j07o9s9b65", "dc1e76f87c7c2d83dcedb8a1204ec22fca3e156b21eb0d"); |
| 18 | } | 18 | } |
| 19 | } | 19 | } |
| 20 | 20 |
app/src/main/java/com/cnlive/im/ui/ChatRoomActivity.java
| @@ -121,7 +121,7 @@ public class ChatRoomActivity extends AppCompatActivity implements View.OnClickL | @@ -121,7 +121,7 @@ public class ChatRoomActivity extends AppCompatActivity implements View.OnClickL | ||
| 121 | mHandler = new Handler(); | 121 | mHandler = new Handler(); |
| 122 | ChatUtil.setOnConnectStatusListener(connectStatusListener); | 122 | ChatUtil.setOnConnectStatusListener(connectStatusListener); |
| 123 | ChatUtil.setOnChatRoomActionListener(chatRoomActionListener); | 123 | ChatUtil.setOnChatRoomActionListener(chatRoomActionListener); |
| 124 | - ChatUtil.setOnReceiveMessageListener(receiveMessageListener); | 124 | + ChatUtil.setOnReceiveChatroomMessageListener(receiveMessageListener); |
| 125 | ChatUtil.setKickedOfflineListener(onKickedOfflineListener); | 125 | ChatUtil.setKickedOfflineListener(onKickedOfflineListener); |
| 126 | Intent intent = getIntent(); | 126 | Intent intent = getIntent(); |
| 127 | user_name_string = intent.getStringExtra("user_name_string"); | 127 | user_name_string = intent.getStringExtra("user_name_string"); |
| @@ -169,10 +169,8 @@ public class ChatRoomActivity extends AppCompatActivity implements View.OnClickL | @@ -169,10 +169,8 @@ public class ChatRoomActivity extends AppCompatActivity implements View.OnClickL | ||
| 169 | keybordBtn = (ImageView) findViewById(R.id.keybord); | 169 | keybordBtn = (ImageView) findViewById(R.id.keybord); |
| 170 | keybordBtn.setOnClickListener(this); | 170 | keybordBtn.setOnClickListener(this); |
| 171 | 171 | ||
| 172 | - | ||
| 173 | StartListener(); | 172 | StartListener(); |
| 174 | 173 | ||
| 175 | - | ||
| 176 | } | 174 | } |
| 177 | 175 | ||
| 178 | 176 |
app/src/main/java/com/cnlive/im/ui/PrivateActivity.java
| @@ -132,7 +132,7 @@ public class PrivateActivity extends AppCompatActivity implements View.OnClickLi | @@ -132,7 +132,7 @@ public class PrivateActivity extends AppCompatActivity implements View.OnClickLi | ||
| 132 | mAudioRecordUtil.setOnAudioStatusUpdateListener(onAudioStatusUpdateListener); | 132 | mAudioRecordUtil.setOnAudioStatusUpdateListener(onAudioStatusUpdateListener); |
| 133 | mHandler = new Handler(); | 133 | mHandler = new Handler(); |
| 134 | ChatUtil.setOnConnectStatusListener(connectStatusListener); | 134 | ChatUtil.setOnConnectStatusListener(connectStatusListener); |
| 135 | - ChatUtil.setOnReceiveMessageListener(receiveMessageListener); | 135 | + ChatUtil.setOnReceivePrivateMessageListener(receiveMessageListener); |
| 136 | requestPermission(); | 136 | requestPermission(); |
| 137 | playerUtil = new PlayerUtil(this); | 137 | playerUtil = new PlayerUtil(this); |
| 138 | } | 138 | } |