How To Disable A Click Event Of Notification In Android Development
Solution 1:
Use Intent intent = new Intent() and insert this into the PendingIntent.
Solution 2:
This is not direct answer, but you shouldn't disable click on notification. This will result in poor user experience, as user will not be able to navigate to your application and/or cancel what you're doing. This may frustrate user, as he or she may not even know what application is the source of this notification and won't be able to easily understand how to remove this notification (if its ongoing).
Solution 3:
As per CommonsWare's answer to my duplicate question, this is not possible. The notification manager is part of the firmware, and we cannot control that part of its behaviour.
Solution 4:
Check this answer. I think you should use setAutoCancel(false) method from NotificationCompat.Builder.
Post a Comment for "How To Disable A Click Event Of Notification In Android Development"