ADWNotifier: what and why
Update: ADWNotifier v0.3 and 0.4
Sorry guys, copypasting code left a stupid bug out there with the “select app” options… please report back if it’s now fixed for everyone.
Update: ADWNotifier v0.2
Ok, with this update you’ll be presented with a few options (i love options :P)
Gmail UNSEEN/UNREAD: show the total unread count (default) or just the last arrived emails since last time you opened the gmail app.
App Selector: Now you can select one of from your installed apps to show the notifications over its icon instead the default one.
Ok, here i’m gonna try to explain how the new ADW.Launcher notifications system work and why i made ADWNotifier a separate app:
Android notifications system:
Each app can use the android notifications system to notify the user about “events” on their apps. But “other apps” cannot access those system notifications.
¿How other apps/widgets work to show “unread counts” and everything else?
They use different approaches depending the app they want notifications tracked. for example, there’s no way for a 3rd party app to intercept GMail notifications, but there’s a way for an app to read gmail data.
Each app can require a different approach, so i couldn’t create a “universal” notification system for every app, ADW.Launcher as an app cannot bypass android permissions, etc.
So, whats’s ADW.Launcher notification system?
It’s just a global receiver listening for other apps PUBLIC broadcasted intents about notifications. It DOES NOT track gmail, email, twitter, facebook, etc, on its own.
¿So why haven’t I made it to properly track gmail, facebook, twitter, etc notifications?
Because for that i would need to create a bunch of background running services, receivers an stuff inside ADW.Launcher, and i think it’s better to leave ADW.Launcher without background stuff.
ADW.Launcher is a big app and users consume a LOT of resources adding more and more widgets, more screens, more icons per screen, themes with hig-res pictures, etc… so i don’t want more resources being hogged by background services INSIDE ADW.Launcher process.
Also, a big issue is handling the 3rd party apps when they change their code and stuff stops working. I don’t want ADW.Launcher to #fail just cause google releases a new gmail app version…
Make ADW just wait for any other app wanting to show a notification inside an icon and show it. That’s all ADW.Launcher does, no so resource hog.
Take a look at Touiteur, it works flawslessly.
This is just a background service with some code to check certain data/events, the inform ADW.Launcher about changes in them.
Soon i’ll try to add more customization to ADWNotifier, such as mapping certain events to certain apps (for example, show SMS unread count over handcent or any other app icon instead the stock sms app), also I’ll try to support other apps notifications, like HTCSense SMS app, and maybe others.
This way, if there’s something wrong with the notifier, ADW.Launcher won’t be affected. Notifier can crash, FC, etc, but as a separate app, it won’t affect ADW.Launcher performance.
Yeah, ¿what else?
Mmmm, yeah, I’m still unemployed so any income is always appreciated.
I don’t think ADWNotifier is expensive, but…
I’m an android dev and i want to add ADW.Launcher notifications support
Easy one, just broadcast an intent with the “org.adw.launcher.counter.SEND” action, the COUNT integer extra and the PNAME string extra.
PNAME would be your app’s package name and COUNT…. the number you wannt to show.
Intent intent=new Intent(); intent.setAction("org.adw.launcher.counter.SEND"); intent.putExtra("PNAME", "app.package.name"); intent.putExtra("COUNT", X); sendBroadcast(intent);
That’s all, hope you all understand.