mirror of
https://gitee.com/farsunset/cim.git
synced 2025-07-19 14:36:15 +08:00
1.服务端springboot升级2.1.4,protobuf升级3.7.0
2.android sdk升级,适配android8.0+,修复一些之前的兼容性问题 2.消息的id字段名由mid修改为id,类型由String修改为long;
This commit is contained in:
parent
8e26600974
commit
351c6bc0ae
@ -22,6 +22,8 @@
|
||||
package com.farsunset.cim.sdk.android;
|
||||
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.Service;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
@ -102,7 +104,13 @@ public class CIMPushService extends Service {
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
startForeground(this.hashCode(), new Notification.Builder(this, null).build());
|
||||
NotificationManager notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
NotificationChannel channel = new NotificationChannel(getClass().getSimpleName(),getClass().getSimpleName(), NotificationManager.IMPORTANCE_LOW);
|
||||
channel.enableLights(false);
|
||||
channel.enableVibration(false);
|
||||
notificationManager.createNotificationChannel(channel);
|
||||
Notification notification = new Notification.Builder(this, channel.getId()).build();
|
||||
startForeground(this.hashCode(),notification);
|
||||
}
|
||||
|
||||
intent = (intent == null ? new Intent(CIMPushManager.ACTION_ACTIVATE_PUSH_SERVICE) : intent);
|
||||
|
Binary file not shown.
Binary file not shown.
2
cim_for_mina/cim-client-android/.idea/misc.xml
generated
2
cim_for_mina/cim-client-android/.idea/misc.xml
generated
@ -5,7 +5,7 @@
|
||||
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
|
||||
</configurations>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
@ -6,7 +6,7 @@ android {
|
||||
defaultConfig {
|
||||
applicationId "com.farsunset.ichat.example"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 26
|
||||
targetSdkVersion 28
|
||||
versionCode 31
|
||||
versionName "3.1.0"
|
||||
}
|
||||
|
Binary file not shown.
@ -7,7 +7,7 @@
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.GET_TASKS" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
|
@ -22,6 +22,8 @@
|
||||
package com.farsunset.cim.sdk.android;
|
||||
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.Service;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
@ -103,7 +105,13 @@ public class CIMPushService extends Service {
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
startForeground(this.hashCode(), new Notification.Builder(this,null).build());
|
||||
NotificationManager notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
NotificationChannel channel = new NotificationChannel(getClass().getSimpleName(),getClass().getSimpleName(), NotificationManager.IMPORTANCE_LOW);
|
||||
channel.enableLights(false);
|
||||
channel.enableVibration(false);
|
||||
notificationManager.createNotificationChannel(channel);
|
||||
Notification notification = new Notification.Builder(this, channel.getId()).build();
|
||||
startForeground(this.hashCode(),notification);
|
||||
}
|
||||
|
||||
intent = (intent == null ? new Intent(CIMPushManager.ACTION_ACTIVATE_PUSH_SERVICE) : intent);
|
||||
|
Binary file not shown.
Binary file not shown.
2
cim_for_netty/cim-client-android/.idea/misc.xml
generated
2
cim_for_netty/cim-client-android/.idea/misc.xml
generated
@ -5,7 +5,7 @@
|
||||
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
|
||||
</configurations>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
@ -7,7 +7,7 @@ android {
|
||||
defaultConfig {
|
||||
applicationId "com.farsunset.ichat.example"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 26
|
||||
targetSdkVersion 27
|
||||
versionCode 31
|
||||
versionName "3.1.0"
|
||||
}
|
||||
|
Binary file not shown.
@ -7,7 +7,7 @@
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.GET_TASKS" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
|
Loading…
x
Reference in New Issue
Block a user