|
|
@@ -897,7 +897,15 @@ public class ApexDriverApplication extends Application {
|
|
|
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
|
|
|
|
- NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_NONE);
|
|
|
+ /**
|
|
|
+ * Oreo不用Priority了,用importance
|
|
|
+ * IMPORTANCE_NONE 关闭通知
|
|
|
+ * IMPORTANCE_MIN 开启通知,不会弹出,但没有提示音,状态栏中无显示
|
|
|
+ * IMPORTANCE_LOW 开启通知,不会弹出,不发出提示音,状态栏中显示
|
|
|
+ * IMPORTANCE_DEFAULT 开启通知,不会弹出,发出提示音,状态栏中显示
|
|
|
+ * IMPORTANCE_HIGH 开启通知,会弹出,发出提示音,状态栏中显示
|
|
|
+ */
|
|
|
+ NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_HIGH);
|
|
|
// 震动
|
|
|
channel.enableVibration(true);
|
|
|
channel.setVibrationPattern(vibrates);
|