So far, Cicada is mostly good for making long-running glanceable
displays and apps that stay on the watch screen. However, one of the
strengths of the watch form factor is notifications, so I've been
wanting to tackle that
I've just checked in a first cut, along with a couple examples: a test
app where you can press a button on the phone screen to trigger a
notification, and another sample app that triggers notifications on
SMS receipt.
Right now, the API works like this:
You have to build against CicadaLib, but the app sending the
notifications doesn't need to subclass CicadaApp.
To create and send a text-based notification:
CicadaNotification notification =
CicadaNotification.createWithText(context, notificationTextString);
CicadaNotificationManager.startNotification(context, notification);
There's also a way send a bitmap for the whole screen, or a bitmap +
text with a rectangle that says where the text goes.
At this point, it works, but the results are pretty ugly. I'm almost
certain that the API will undergo some tweaking before we're done with
this. Perhaps it should follow after the Growl API:
http://growl.info/documentation/developer/implementing-growl.php
Here's what I'm thinking about:
* We still need a mechanism for enabling and disabling particular
notifications within the central settings.
* A notification should be able to have a custom vibration pattern
attached
* Cicada should recognize a button press to cancel abusively long
notifications
* stopNotification hasn't been implemented at all, but we'll need it
for things like incoming call notifications and things like alarms
* I'm not sure if the idea of a bitmap template + text is going to get
too fiddly; perhaps it should just be either raw text, or a bitmap
that's completely drawn by the app sending the notification, so that
it has full control
* The text layout should be smarter, so that it's less likely to look
like rubbish than it is right now
* Cicada doesn't yet prevent a normal app/widget screen update from
stomping a notification
* Possibly some way to have button presses during notification get
back to the app that sent it?
Ultimately, my goals here are the usual "make the easy things easy and
the hard things possible"; specifically, I want to keep the overhead
to send a simple notification at a minimum.
Joe