使android通知声音上升

时间:2017-03-17 10:59:20

标签: android notifications

我的应用程序中有自定义通知声音,带有这些参数。

                NotificationCompat.Builder mBuilder =
                        new NotificationCompat.Builder(this)
                                .setSmallIcon(R.mipmap.ex_mark_r)
//                            open app on click
                                .setContentIntent(contentIntent)
                                .setSound(defaultSoundUri, RingtoneManager.TYPE_ALARM)
                                .setContentTitle(title)
                                .setAutoCancel(false)
                                .setCategory(Notification.CATEGORY_ALARM)
                                .addAction(R.mipmap.ex_mark_r, getResources().getString(R.string.alert), pendingIntentAlert)
                                .addAction( R.mipmap.close, getResources().getString(R.string.dismiss), pendingIntentDismiss)
                                .setContentText(message);
//                            .setFullScreenIntent(contentIntent, true);
                mBuilder.setDefaults(Notification.DEFAULT_VIBRATE);
                mBuilder.setDefaults(Notification.DEFAULT_LIGHTS);

                mNotification = mBuilder.build();
                mNotification.flags |= Notification.VISIBILITY_PUBLIC;

                mNotification.flags |= Notification.FLAG_INSISTENT;
                mNotification.flags |= Notification.FLAG_HIGH_PRIORITY;
                mNotification.flags |= Notification.PRIORITY_MAX;
                mNotification.flags |= Notification.FLAG_AUTO_CANCEL;
            }

如何使声音上升[从低位开始降低]?

0 个答案:

没有答案