Alarm notification is not working but should not

I am using ALARM category and highest priority when creating my notification.

final NotificationCompat.Builder builder = new NotificationCompat.Builder(mContext)
                .setSmallIcon(R.drawable.ic_stat_notification)
                .setContentTitle(contentTitle)
                .setContentText(contentText)
                .setPriority(NotificationCompat.PRIORITY_MAX)
                .setCategory(NotificationCompat.CATEGORY_ALARM)
                .setWhen(alarmTime)                    .setColor(mContext.getResources().getColor(R.color.theme_accent))
                .setAutoCancel(true);

      

But still, my HTC One Max is currently running Android 5.0.1, whenever the user disconnects the phone, no sound is played EVEN, although there is still a loud sound when adjusting the volumes in the alarms. (this is dialogue on HTC phones with three silders: one for ringtone, one for music and video, and one for alarms).

Is there a way to make sure the alarm is playing for the user?

Thank!

+3


source to share


2 answers


Set alert permission in manifest



SET_ALARM

0


source


Please post your manifest and whatever Broadcast you are using. Most likely, you have a typo anywhere, or another possibility - another application that has the same or higher priority over the same recipient.



0


source







All Articles