cruffenach/CRToast — pull request #94 by andyzei (2014-08-23 19:05:01+00:00)
Title: Add new 'showBegin' optional block, constructors to enable proper syncing of sound/vibration with queued notifications.

CRToast automatically handles notification queuing, which is great -- it's essentially fire-and-forget. Currently, there is an optional block that you can provide to be called *after* a notification shows. Unfortunately, there isn't a way to get notified when a notification is actually being shown.

The scenario here is that several notifications are queued to show, and you want to play a sound / vibration each time a notification is dequeued/shown.

This change simply adds an additional block property to CRToast, and a new constructor that lets the caller provide it. The block is called immediately before the notification is shown.

I did my best to emulate the project formatting / conventions -- if you have feedback, I'm happy to do an iteration or two. Thanks for providing this library -- it's really great.

Thanks,

Andy