I\'m trying to write a very basic android accessibility service that shows a message and vibrates when any notification is raised. I\'ve tried testing it by sending an email
Accessibility Service is overkill for your purposes, you should use NotificationListenerService. The NotificationListenerService is much easier to implement and safer for users (privacy reasons).