How to write a DashClock Extension: Whatsapp Extension example

After BatteryExtension and DialExtension , now I tried to write an unofficial Whatsapp Extension for DashClock . It was not so easy... WhatsApp does not expose an API or official ContentProvider and therefore the only idea I had was to listen for status bar notifications. It requires you to enable a Accessibility Service to work. I don't like this way, because it needs relatively deep/dangerous permission authorizations. At present, I would't install an application that requires this type of authorization. With these permissions, an app can listen for all notification from all apps... You can specify which packages you want to listen to and only listen to those package, but users don't have visibility of this information . It would be a good idea if in the next version of Android this information was available. You can listen for status bar notifications by using AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED . We are going to write our WhtNotificati...